Search code examples
iosiphonescreen-size

iPhone 6 plus dimensions showing up as 375.0 x 667.0?


This one is perplexing me.

println("screenWidth \(UIScreen.mainScreen().bounds.size.width)")
println("screenHeight \(UIScreen.mainScreen().bounds.size.height)")
println("viewWidth \(self.view.bounds.size.width)")
println("viewHeight \(self.view.bounds.size.height)")

iphone 6 plus (USING SIMULATOR) returns the correct size for an 6 plus:

deviceWidth 414.0
deviceHeight 736.0
viewWidth 414.0
viewHeight 736.0

iphone 6 plus (REAL DEAL) returns the correct size for a regular ole 6:

deviceWidth 375.0
deviceHeight 667.0
viewWidth 375.0
viewHeight 667.0

How might this be possible?


Solution

  • Your device has the Display Zoom set to Zoomed under Settings->Display & Brightness.

    Quoting a post from the Apple Developer Forum:

    If the phone is set for zoomed mode, you get either the iPhone 5S screen size (on iPhone 6) or the iPhone 6 size (on iPhone 6 Plus). Keep in mind that on iPhone 6 Plus in zoomed mode you still get a 3x screen, and thus your 3x assets are used.