Last active
February 28, 2016 02:56
-
-
Save priore/3d395a97e9a7e5a1fec9 to your computer and use it in GitHub Desktop.
iOS8: correct screen bounds
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
| static inline CGSize screenSize() | |
| { | |
| CGSize screenSize = [UIScreen mainScreen].bounds.size; | |
| if ((NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1) && UIInterfaceOrientationIsLandscape(getOrientation())) { | |
| return CGSizeMake(screenSize.height, screenSize.width); | |
| } else { | |
| return screenSize; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment