The first screen will be the screen of the device. Please note that before sending, you need to add launch images for new phones, otherwise the application will be launched in Zoomed Mode for older applications: Here is the code that I used to check this. Note. This only works with iOS version 8 and higher :
UIScreen *mainScreen = [UIScreen mainScreen]; NSLog(@"Screen bounds: %@, Screen resolution: %@, scale: %f, nativeScale: %f", NSStringFromCGRect(mainScreen.bounds), mainScreen.coordinateSpace, mainScreen.scale, mainScreen.nativeScale);
Code for detecting iPhone 6 Plus:
#define IS_PAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) #define IS_PHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) -(BOOL)iPhone6PlusDevice{ if (!IS_PHONE) return NO; if ([UIScreen mainScreen].scale > 2.9) return YES;
or
-(BOOL) iPhone6PlusUnZoomed{ if ([self iPhone6PlusDevice]){ if ([UIScreen mainScreen].bounds.size.height > 720.0) return YES;
Note. If you are testing the iPhone 6 Plus to customize the user interface, then do not rely on .nativeScale because the simulator and the actual device give different results. Due to the comment below. Scale is CGFloat, and therefore the code should not check for equality, since some float values can never be equal.
After adding boot images for the new iPhone6 and 6Plus, the sizes change. They scale old applications to fit the screen.
Size for iPhone 6 Plus and iPhone 6S Plus with @ 3x scaling (Apple name: Retina HD 5.5 ), coordinate space: <strong> 414 x 736 and 1242 x 2208 pixels, 401 dpi, physical screen size 2.7 x 4 , 8 inches or 68 x 122 mm :
Screen bounds: {{0, 0}, {414, 736}}, Screen resolution: <UIScreen: 0x7f97fad330b0; bounds = {{0, 0}, {414, 736}}; mode = <UIScreenMode: 0x7f97fae1ce00; size = 1242.000000 x 2208.000000>>, scale: 3.000000, nativeScale: 3.000000
Size for iPhone 6 and iPhone 6S with @ 2x scaling (Apple name: Retina HD 4.7 ), coordinate space: 375 x 667 and 750 x 1334 pixels, 326 dpi, physical screen size - 2.3 x 4.1 inches or 58 x 104 mm :
Screen bounds: {{0, 0}, {375, 667}}, Screen resolution: <UIScreen: 0x7fa01b5182d0; bounds = {{0, 0}, {375, 667}}; mode = <UIScreenMode: 0x7fa01b711760; size = 750.000000 x 1334.000000>>, scale: 2.000000, nativeScale: 2.000000
And iPhone 5 for comparison is 640 x 1136, iPhone 4 640 x 960.
Note. Download LaunchImages, otherwise the application will start scaling and not display the correct scaling or screen size.
