For some reason, I can’t call the initWithNibName method with getting the error message: “The result of a delegate init call must be immediately returned or assigned to ‘self'”. Is this some ARC perk, because without specifying the nib name, I can’t initialize the view.
Here is my code in the .m file:
#import "SimpleMotionControllerIntroduction.h"
@implementation SimpleMotionControllerIntroduction
-(id) init
{
self = [super init];
if (self)
{
[self initWithNibName:@"SimpleMotionIntroductionView" bundle:nil];
}
return self;
}
@end
I feel like I’m making some sort of a careless error, I’ve worked with iOS 5 before, and made an app just like this that worked the same way. Thanks in advance.
Two careless errors: you are calling two init methods (1) and you are ignoring the result from the second (2, triggers the error message).
You should never have two
initcalls for one object. Note thatinitWithNibNamecallsinit, too. I think this would actually result in an endless recursion and eventually stack overflow.