"Method definition not in @implementation context"?

Posted by Nathan Hess on Stack Overflow See other posts from Stack Overflow or by Nathan Hess
Published on 2010-05-24T22:04:20Z Indexed on 2010/05/24 22:11 UTC
Read the original article Hit count: 410

Filed under:

I put this in X-code:

- (void)viewDidLoad {
    [super viewDidLoad];
 NSString *path = [[NSBundle mainBundle] pathForResource:@"DrinkArray" ofType:@"plist"];
 NSMutableArray* tmpArray = [[NSMutableArray alloc] initWithContentsOfFile:path];
 self.drinks = tmpArray;
 [tmpArray release];
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

And it says this on the first line:

"Method Definition not an @implementation context"

Could anyone help?

© Stack Overflow or respective owner

Related posts about objective-c