Guest User

Untitled

a guest
Jan 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  2. {
  3. // Override point for customization after application launch.
  4. // Add the split view controller's view to the window and display.
  5.  
  6.  
  7. self.window.rootViewController = self.splitViewController;
  8. IntroViewController *temp = [[IntroViewController alloc] initWithNibName:@"IntroViewController" bundle:nil];
  9.  
  10.  
  11. /*
  12. UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
  13. UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
  14. UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeLeft,
  15. UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeRight
  16. */
  17.  
  18. if([UIApplication sharedApplication].statusBarOrientation == UIDeviceOrientationPortrait ||
  19. [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown)
  20. {
  21. NSLog(@"port");
  22. [temp setIsPort:YES];
  23.  
  24. }
  25. else if([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft ||
  26. [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight)
  27. {
  28. NSLog(@"land");
  29. [temp setIsPort:NO];
  30.  
  31. }
  32.  
  33. [self.window addSubview:temp.view];
  34. [self.window makeKeyAndVisible];
  35.  
  36. return YES;
  37. }
Add Comment
Please, Sign In to add comment