Sunday, 18 August 2013

Cannot make new class

Cannot make new class

Every time I try to make a new class I get a bunch of errors without even
writing a single line of code.
register.h
#import <UIKit/UIKit.h>
@interface register : UIViewController
@end
Gives errors:
Expected identifier
Expected identifier or '('
register.m
#import "register.h"
@interface register ()
@end
@implementation register
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
@implementation register
Expected identifier
Expected identifier or '('
- (void)viewDidLoad and - (void)didReceiveMemoryWarning give:
Missing context for method declaration
@end gives:
@end must appear in an objective-c context
This happens every time I make a new class without writing any code at all.

No comments:

Post a Comment