title: Instantiating a View Controller programmatically with Storyboard from AppDelegate
body: <p>I'm busy building an app - that when launched for the first time it asks the user to do two things: </p>
  
  <ol>
  <li>Select a Country </li>
  <li>Accept T&amp;Cs </li>
  </ol>
  
  <p>From there it goes to the home view controller. </p>
  
  <p>The problem I am currently facing is pushing the first view controller onto the screen from my app delegate. I'm using storyboards / Xcode 5/ iOS7 </p>
  
  <p>Here is the code I came up with:</p>
  
  <pre><code>UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
  UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle: nil];
  BBCounterySettingsViewController *controller = (BBCounterySettingsViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"CountrySettings"];
  [navigationController pushViewController:controller animated:NO];
  </code></pre>
  
  <p>The problem is the app crashes when it hits the last line of code with the following error: </p>
  
  <blockquote>
    <p><em>*</em> Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController
    pushViewController:animated:]: unrecognized selector sent to instance
    0x8e9a400'</p>
  </blockquote>
  
  <p>Anyone have any ideas what I am doing wrong?</p>