title: Make UITableView selection before view appears
body: <p>I'm building a detail view for a UITableView. The detail view contains a UITableView which has two rows, and I want the first one to be selected when the detail view is opened. I have tried to use the method <code>[selectRowAtIndexPath:animated:scrollPosition]</code> in <code>[viewWillAppear]</code>:</p>
  
  <pre><code>- (void) viewWillAppear:(BOOL)animated {  
      [[self tableView] selectRowAtIndexPath:[NSIndexPath indexPathForRow:kStartDateRow inSection:kSection]  
                                    animated:NO  
                              scrollPosition:UITableViewScrollPositionNone];  
  }
  </code></pre>
  
  <p>However, the selection is not affected by this, and using it in <code>[viewDidAppear]</code> means the selection changes once the view has moved into place. How can I make the selection before the detail view appears on screen?</p>
  
  <p>You can see an example of the behaviour I want in the Settings app. Go to General > Date &amp; Time > Set Date &amp; Time.</p>