开发者

OBJ C - error: no type or storage class may be specified here before 'interface'

开发者 https://www.devze.com 2023-03-04 20:08 出处:网络
I have fresh .h .m .xib files, and on compile next to the interface declaration I get: Problem in another file maybe?the @end is in place.Same results when UIKit is the only import.

I have fresh .h .m .xib files, and on compile next to the interface declaration I get: Problem in another file maybe? the @end is in place. Same results when UIKit is the only import.

error: no type or storage class may be specified here before 'interface'

   #import <UIKit/UIKit.h>
   #import "NavigationDelegate.h"
   #import "ErrorDelegate.h"


@interface PortraitFrontViewController : UIViewController {

}
@end

EDIT: PortraitFrontViewController.h:

#import "PortraitFrontViewController.h"


@implementation PortraitFrontViewController

- (id)initWithNibName:(NSString *)nibNameOrNil b开发者_如何学Cundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)dealloc
{
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return YES;
}

@end


EDIT: Never mind, OP made a mistake posting the code. Will update this answer when the other file is posted.

0

精彩评论

暂无评论...
验证码 换一张
取 消