Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save damonjones/6dc68c7758f175626319 to your computer and use it in GitHub Desktop.
Save damonjones/6dc68c7758f175626319 to your computer and use it in GitHub Desktop.
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