I have an class that inherits from UIViewController. There, I want to make some ivar initialization like this:
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle { // Load the view nib
NSLog(@"Hello Earth!");
if (self = [super initWithNibName:nibName bundle:nibBundle]) {
self.visibleIndex = 0;
NSLog(@"Hello Planet!");
}
return self;
}
For some reason I do see the contents that were loaded from the nib. But for another reason this initializer will never be called. I never get the log messages. What's wrong with that? I have a nib for sure, so actually this would have to be called, right?