AppLuanches with flip Screen

55 Views Asked by At

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]];
   }
0

There are 0 best solutions below