Search code examples
iosscreen-sizexcode6.1iphone-6iphone-6-plus

i am trying to get iPhone 6 screen size in simulator but it showing the wrong dimensions


Here u see the Width as 320 and Height as 568 but it is wrong because i am running in iPhone 6 and iPhone 6 Plus simulators. Any one of you know why it happens like this. I Reset the simulator and tried there is no change.

This is for iPhone 6 Plus enter image description here

This is for iPhone 6 enter image description here


Solution

  • Until you will not add the launch image for iPhone 6 and 6 plus it will not resize your views according to the iPhone 6 and 6 plus but it will return it as of iPhone 5.

    It is because if your app is build on xcode 5 using the ios version less than 8.0, apple will take care and they will be scaled and stretched to fit them in iPhone6 and iPhone 6 plus. If you want to take advantage of new devices you will have to uadd launch images on your project. find the Question it will clear your doubt.