title: How to show login screen only for the first time when app launches
body: <p>I want to launch the login screen when first time app launches other wise app work simple but problem is that again again it goes to login screen.</p>
  
  <p>here is the code which i am using in didFininsh</p>
  
  <p>I want the user show go to login screen first time only and next time it should show splitViewController</p>
  
  <pre><code>     [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES],@"firstLaunch",nil]];
  
  if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstLaunch"]) {
  
  
  
      [self.window addSubview:[splitViewController view]];
  
      LoginViewController *targetController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
      targetController.modalPresentationStyle = UIModalPresentationFullScreen;
  
  
      [self.splitViewController presentViewController:targetController animated:YES completion:nil];
  
      }
  
  else {
  
  
      [self.window addSubview:[splitViewController view]];
  
  }
  
  
  // my comment[window addSubview:splitViewController.view];
  [window makeKeyAndVisible];
  
  
  return YES;
  </code></pre>