I need to subclass UINavigatonController. In my subclass, I overwrite the init
-(id)-(id)initWithRootViewController:(customViewControllerA*)rootViewController
{
if(self=[super initWithRootViewController:rootViewController])
{
...initialzation block....
}
}
I am surprise to discover when executing [super initWithRootViewController:], it calls viewDidLoad first then return to assign the instance to self. For most of my other classes it returns an instance right after the [super init..] call and continue to execute the initialization block before the viewdidload call.
This incident of reverse sequence makes me recheck all my other classes to ensure correct logic flow. Any body knows why UINavigationController does this?