Forked from eytanschulman/Check for iPhone 3.5",4",4.7" or 5.5"
Last active
August 29, 2015 14:06
-
-
Save damonjones/6dc68c7758f175626319 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
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { | |
CGSize result = [[UIScreen mainScreen] bounds].size; | |
if(result.height == 480) | |
{ | |
NSLog(@"Device is iPhone 4"); | |
} | |
if(result.height == 568) | |
{ | |
NSLog(@"Device is iPhone 5s"); | |
} | |
if (result.height == 667) { | |
NSLog(@"Device is iPhone 6"); | |
} | |
if (result.height == 736) { | |
NSLog(@"Device is iPhone 6 Plus"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment