I am creating a UIViewController using the nib file ?
I have implemented the following 2 methods
- (void)viewDidAppear:(BOOL)animated
- (void)viewWillAppear:(BOOL)animated
in my view controller, but these methods are not getting called every time ?
What is the error in the code ?
When initializing from a nib, you can use the
awakeFromNib
method.Depending on how you load your viewController, your
will not get called.
Here is one way I load viewcontrollers. As you see, I explicitly call viewDidAppear, viewDidDisappear, etc. myself.