0

I have an iPhone 6 that I'm developing code for in Xcode and I am having problems with reported screen size, my phone reports the wrong value!

UIScreen.mainScreen().bounds:

  • Actual Value - 375 x 667

  • Reported Value (Simulator) - (0.0, 0.0, 375.0, 667.0)

  • Reported Value (My Phone) - (0.0, 0.0, 320.0, 568.0)

Problem:

The values reported by my phone, an iPhone 6, are wrong. The phone is reporting values for the iPhone 5 !!

Questions

  1. Why does my phone show the wrong values ???
  2. How to fix this, and make it show the correct (375x667) values ?

Here is an illustration of the real values :

enter image description here

To note, this is SUCH a nuisance. My screen layouts are all messed up any time I try to used UIScreen.mainScreen().bounds :)

J-Dizzle
  • 4,861
  • 4
  • 40
  • 50
  • That seems to be related to auto scaling for iPhone 6. Do you have an iPhone6 launch screen image, or a launch screen storyboard? – manecosta Jan 08 '16 at 15:15
  • my code is 100% programmatic, there is no storyboard. Could be the issue!! :) – J-Dizzle Jan 08 '16 at 15:23
  • 1
    http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions – Pipiks Jan 08 '16 at 15:47
  • Wow - Display Zoom!!!! THANK YOU - I'll research, resolve and hopefully conclude after work. THANK YOU!!!! :) – J-Dizzle Jan 08 '16 at 15:54
  • If you either add a launch screen image for iPhone6 or you add a launch screen storyboard, the UI will be drawn in native resolution on iPhone 6, fixing your problem – manecosta Jan 08 '16 at 19:37

0 Answers0