Last active
August 29, 2015 14:16
-
-
Save maxchuquimia/e227234bd77db0808fa2 to your computer and use it in GitHub Desktop.
Determine Portrait or Landscape from iOS Extension
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
//This is currently working in my Keyboard Extension (not upside-down friendly) | |
- (BOOL)isPortrait { | |
CGFloat portraitWidth = [[UIScreen mainScreen] nativeBounds].size.width/[UIScreen mainScreen].scale; | |
CGFloat thisWidth = [[UIScreen mainScreen] bounds].size.width; | |
return portraitWidth == thisWidth; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment