title: Call NavigationController (xib) from ViewController (storyboard)
body: <p>I'm normally just use storyboard for my iOS, but needed to integrate an SDK which does not use storyboard, rather xib.  My initial view controller is from storyboard, and when a button is pushed (IBAction), I would like it to go to the xib view controller, but not sure how programmatically to do so. Here is my AppDelegate:</p>
  
  <pre><code> //AppDelegate.m
  
   - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:...{   
  
  // set to storyboard on launch
  UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"iPhoneStoryboard"
                                                           bundle: nil];
  
  UIViewController* viewController = [mainStoryboard instantiateInitialViewController];
  [self.window setRootViewController:viewController];
  
   [window makeKeyAndVisible];
   return YES;
   }
  </code></pre>
  
  <p>Here is my code .h:</p>
  
  <pre><code> //mainVC.h
   #import &lt;UIKit/UIKit.h&gt;
  
   @interface MainVC : UIViewController{
   UIWindow *window;
   UINavigationController *navigationController;
   }
  
   @property (nonatomic, retain) IBOutlet UIWindow *window;
   @property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
   @property (nonatomic, retain) IBOutlet UIButton *buttonScan;
  
   -(IBAction) ActionScan;
  
   @end
  </code></pre>
  
  <p>And the .m:</p>
  
  <pre><code> //mainVC.m
   @interface MainVC ()
  
   @end
  
   @implementation MainVC
  
   @synthesize window;
   @synthesize navigationController;
   @synthesize buttonScan;
  
   - (IBAction)ActionScan{
  
  window.rootViewController = navigationController;
  [window makeKeyAndVisible];
  
   }
  </code></pre>