Last active
January 25, 2018 07:56
-
-
Save Banck/254ddb74438afad8074f96cdb1196c85 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 { | |
id presentedViewController = [window.rootViewController presentedViewController]; | |
NSString *className = presentedViewController ? NSStringFromClass([presentedViewController class]) : nil; | |
if (window && [className isEqualToString:@"SKStoreProductViewController"]) | |
return UIInterfaceOrientationMaskLandscape; | |
else | |
return UIInterfaceOrientationMaskPortrait; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment