Note that there are some explanatory texts on larger screens.

plurals
  1. POviewWillAppear, viewDidAppear not being called, not firing
    primarykey
    data
    text
    <p>(This is both question and answer since it took quite a bit of digging to find the real answer.)</p> <p>Symptom: <code>viewWillAppear</code>, <code>viewDidAppear</code> were not being called in my UIViewController. </p> <p>Cause: Embedding a <code>UINavigationController</code> or <code>UITabBarController</code> (my case) in a <code>UIViewController</code> somehow interrupts with the calling of these methods.</p> <p>Solution: Call them manually in the <code>UIViewController</code> that contains the aforementioned <code>UINavigationController</code> / <code>UITabBarController</code>.</p> <p>For example (assuming <code>projectNavigationController</code> is your <code>UINavigationController</code>):</p> <pre> -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [projectNavigationController viewWillAppear:animated]; } -(void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; [projectNavigationController viewWillDisappear:animated]; } -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [projectNavigationController viewDidAppear:animated]; } -(void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; [projectNavigationController viewDidDisappear:animated]; } </pre> <p>In my case I had an inner <code>UITabBarController</code> and I called the methods accordingly and all was solved.</p> <p>(Attribution on the solution: <a href="http://davidebenini.it/2009/01/03/viewwillappear-not-being-called-inside-a-uinavigationcontroller/" rel="noreferrer">http://davidebenini.it/2009/01/03/viewwillappear-not-being-called-inside-a-uinavigationcontroller/</a>)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload