title: Changing the first ViewController in iOS
body: <p>Initially I developed the app with only one ViewController(called MainView). Now I'd like to add one ViewController (called LoginView)infront of MainView. I added in the AppDelegate as </p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      // Override point for customization after application launch.
      UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
  
      LoginPage *RootViewController = [mainStoryBoard instantiateViewControllerWithIdentifier:@"LoginPage"];
      [UIApplication sharedApplication].delegate.window.rootViewController = RootViewController;
      [[UIApplication sharedApplication].delegate.window makeKeyAndVisible];
      return YES;
  }
  </code></pre>
  
  <p>It looks working, but only black screen appears.
  My LoginPage ViewController has the following structure. The ViewController has two buttons, one label and one text view. They don't appear and only black screen is appearer.</p>
  
  <p><a href="https://i.stack.imgur.com/F4FMy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F4FMy.png" alt="enter image description here"></a></p>