title: Programmatically change rootViewController of storyBoard
body: <p>I have created my project using <code>Storyboards</code>. The root <code>ViewController</code> lies inside a <code>Storyboard</code>, I have not written a single code in the <code>appDelegate</code>.</p>
  
  <p>Now I want to show a tour of my app, so I want to change the root <code>ViewController</code> from <code>Tab Bar</code> to my TourVC and when the tour of the app is finished , I want to again switch back my root <code>ViewController</code> to <code>Tab Bar</code>.</p>
  
  <p>So I looked up online and followed the following points</p>
  
  <p>1) Remove <code>Storyboards</code> from app.plist file,
  2) Uncheck option "isInitialViewController" from <code>Storyboards</code> which is checked in case of <code>Tab Bar</code> controller because its a root <code>ViewController</code>,
  3) Add this code in appDelegate.m file.</p>
  
  <pre><code>self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  ProductTourViewController *PT = [[ProductTourViewController alloc] initWithNibName:@"ProductTourViewController" bundle:nil];
  self.window.rootViewController = PT;
  [self.window makeKeyAndVisible];
  return YES;
  </code></pre>
  
  <p>But my app crashes with this error log,</p>
  
  <pre><code>[ProductTourViewController selectedViewController]: unrecognized selector sent to instance 0x1766a9e0
  </code></pre>
  
  <p>And also I get a warning,</p>
  
  <pre><code>Unsupported Configuration: Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via -instantiateViewControllerWithIdentifier:.
  </code></pre>