Created
December 17, 2012 00:22
-
-
Save romyilano/4314548 to your computer and use it in GitHub Desktop.
CHeck against the screensize of an iPhone 5 or iPhone 4
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
// source: http://stackoverflow.com/questions/12395200/how-to-develop-or-migrate-apps-for-iphone-5-screen-resolution/12397309#12397309 | |
CGRect screenBounds = [[UIScreen mainScreen] bounds]; | |
if (screenBounds.size.height == 568) { | |
// code for 4-inch screen | |
} else { | |
// code for 3.5-inch screen | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment