What is the full sequence events in terms of how a view controller loaded into memory from init to viewDidLoad?
If you do something like:
TabControllerClass *cc = [[TabControllerClass alloc] initWithCustomData:something];
Can the class's viewDidLoad get invoked before reaching the end of the custom init method, 'initWithCustomData'?
- (id)initWithCustomData:(NSString *)something
{
if (self = [super init])
{
// A bunch of other initialization happens
}
// Would you reach here before 'viewDidLoad' is invoked?
return self;
}
where my TabControllerClass inherits from UITabBarController.
I assume not. I mean, how can any method be called before the controller is correctly allocated and initialized? However, you may find that your -[ControllerClass initWithCustomData]
initializer isn't the designated initializer, which could explain why it isn't being called.
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