Created
October 26, 2012 02:46
-
-
Save BrettBukowski/3956617 to your computer and use it in GitHub Desktop.
Get the application frame, accounting for current interface orientation
This file contains 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
+ (CGRect) currentApplicationFrame { | |
CGRect appFrame = [[UIScreen mainScreen] applicationFrame]; | |
if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { | |
return CGRectMake(0.0, 0.0, appFrame.size.height, appFrame.size.width); | |
} | |
return appFrame; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment