title: Apple iOS5 and didFinishLaunchingWithOptions
body: <p>I have an iPhone App that uses <code>UITableViewController</code> to show a table on the screen. The data of the table (and more data used by the App) is initialized on: <code>didFinishLaunchingWithOptions:</code> method of my App Delegate.
  The App works perfectly on iOS4. On iOS5, the data of the table doesn't load.
  I checked and found that the <code>didFinishLaunchingWithOptions:</code> method is now called in parallel with showing the view. For this reason, when getting the size of the table, I go to my App Delegate, which still didn't load the table data and therefore return "0".</p>
  
  <p>Is there a way of solving this issue in iOS 5?</p>
  
  <p>Here is the method that gets called first on my view:</p>
  
  <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      PalmsterAppDelegate *appDelegate = (PalmsterAppDelegate *)[[UIApplication sharedApplication] delegate];
      NSLog(@"tableView: %i", [appDelegate.listOfItems count]);
      return [appDelegate.listOfItems count];
  }
  </code></pre>
  
  <p>calling: <code>[appDelegate.listOfItems count]</code> returns zero. And it clearly shows that the order things is:</p>
  
  <p><code>didFinishLaunchingWithOptions</code> is called (I print to the log on the start of the method).
  Then <code>tableView</code> is called and prints zero. Then <code>didFinishLaunchingWithOptions</code> finishes (I print to the log at the end of the method as well).</p>