0

I have app in which there is LoginView i am doing like this if user enter first time in app it will show him login screen it work fine but probelm is that when login screen commes before that with a blink of eye you see the main screen of splitView controller.

here is my code

   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 {

    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

    NSString*userNameM=[defaults objectForKey:@"userName"];
    NSString*userIDM=[defaults objectForKey:@"userID"];

    NSString*organizationCodeM=[defaults objectForKey:@"organizationCode"];

    userName=userNameM;
    userID=userIDM;

    organizationCode=organizationCodeM;

    [self.window addSubview:[splitViewController view]];
   }
user2240329
  • 97
  • 2
  • 11
  • take a look this http://stackoverflow.com/questions/11626031/i-would-like-to-flip-my-apps-splash-screen-how-can-i-mimic-the-flip-animation you must google it befor asking qutestion there are lots of similar question. – Nitin Gohel Jul 17 '13 at 05:27
  • @NitinGohel i do not want flip screen but i want that when i login screen is opened it shows splitViewController screen also with a blink becuase we are adding LoginViewController on splitViewController so it first loads spliViewController and then add loginViewController – user2240329 Jul 17 '13 at 05:30

0 Answers0