Created
June 20, 2016 19:01
-
-
Save olxios/cf999ff98be85f83069fa76bc0cac384 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window | |
{ | |
if ([self.window.rootViewController.presentedViewController isKindOfClass:[SecondViewController class]]) | |
{ | |
SecondViewController *secondController = (SecondViewController *) self.window.rootViewController.presentedViewController; | |
if (secondController.isPresented) // Check current controller state | |
{ | |
return UIInterfaceOrientationMaskAll; | |
} | |
else return UIInterfaceOrientationMaskPortrait; | |
} | |
else return UIInterfaceOrientationMaskPortrait; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment