title: UINavigationController not added correctly when initiated by viewDidLoad
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7221843/call-function-on-viewdidload-solved">Call function on &quot;viewDidLoad&quot; [SOLVED]</a>  </p>
  </blockquote>
  
  
  
  <p>I have function, startApp, which looks like this:</p>
  
  <pre><code>- (void)startApp {
  NSLog(@"startApp initiated");
  
  aNavController = [[UINavigationController alloc] initWithNibName:nil bundle:nil];
  [self presentModalViewController:aNavController animated:YES]; }
  </code></pre>
  
  <p>When called by a button, like:</p>
  
  <pre><code>- (IBAction)showSettings:(id)sender {
  [self startApp]; }
  </code></pre>
  
  <p>It works fine, but called by viewDidLoad, like:</p>
  
  <pre><code>- (void)viewDidLoad {
  [super viewDidLoad];
  [self startApp]; }
  </code></pre>
  
  <p>"startApp initiated" is outputted but the NavigationController does not appear. I have no idea why this is, it seems to that they should work the same way? Being in the same file and all. Does anyone have any idea why this isn't working properly?</p>
  
  <p>Thank you,
  Tobias Tovedal</p>