iPhone XR UIScreen.main.bounds reports 375 x 812

359 Views Asked by At

Xcode 10.1 Swift 4.2

My blue iPhone XR used to report 414 x 896 for UIScreen.main.bounds

let screenSize = UIScreen.main.bounds
print(screenSize)
// (0.0, 0.0, 414.0, 896.0)

Now it reports 375.0, 812.0, which is the same size as the iPhone X.

let screenSize = UIScreen.main.bounds
print(screenSize)
// (0.0, 0.0, 375.0, 812.0)

This doesn't happen in the simulator (XR), only on the device. I've updated to latest iOS 12.1.1 and cleared build folder. Anyone have an idea what might be going on, or do I have a faulty phone?

1

There are 1 best solutions below

0
On BEST ANSWER

Your phone has the display zoomed in.

Settings > Display

When you set the value to Standard, then you will see the expected values.

enter image description here