Showing posts with label iPhone 5. Show all posts
Showing posts with label iPhone 5. Show all posts

Tuesday, March 5, 2013

How to check if app is run under iPhone 5 (the one with 4" screen)?

Sometimes you need to check if app is run under iPhone 5 which has higher screen resolution than previous models. This code should be helpful:

- (BOOL)isIPhone5
{
    return [[UIScreen mainScreen] bounds].size.height == 568;
}