Possible Duplicate:
Semicolon after the method name in Objective-C implementation file
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
Why I add ; at the end of the function is also correct?
It's an Objective-C convenience. It's so that you can copy/paste the method signature line from your header file. It's one of those things that has been around since the NeXTStep days.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With