Hi,
I need to programatically check for the screen size and if it is iPhone 6 then the app should load the background image with the correct size.
I used the bellow code to check the screen size.
This returns 667 x 375.
But when I set the UIImageView's frame to 0, 0, 667, 375 it doesn't fit the screen (my app runs in the landscape orientation only). I figured it out that the 1080 x 768 size makes the UIImageView fitting the entire screen. I'm confused as this is neither the resolution read in points or the native resolution of the device?
I need to programatically check for the screen size and if it is iPhone 6 then the app should load the background image with the correct size.
I used the bellow code to check the screen size.
Code:
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
This returns 667 x 375.
But when I set the UIImageView's frame to 0, 0, 667, 375 it doesn't fit the screen (my app runs in the landscape orientation only). I figured it out that the 1080 x 768 size makes the UIImageView fitting the entire screen. I'm confused as this is neither the resolution read in points or the native resolution of the device?