UIDeviceComplete icon indicating copy to clipboard operation
UIDeviceComplete copied to clipboard

Display Zoom causes sizeInches to be nil (with iPhone 12 mini)

Open kevinrenskers opened this issue 4 years ago • 1 comments

When running on an iPhone 12 mini

UIDevice.current.dc.screenSize.height = 812 UIDevice.current.dc.screenSize.scale = 3 UIDevice.current.dc.screenSize.sizeInches = 5.8

But with Display Zoom turned on I get these values:

UIDevice.current.dc.screenSize.height = 693 UIDevice.current.dc.screenSize.scale = 3

And since there is no match, sizeInches is nil.

kevinrenskers avatar Jun 24 '21 12:06 kevinrenskers

You're going to have the same problem on more devices, see also https://hacknicity.medium.com/how-ios-apps-adapt-to-the-various-iphone-12-screen-sizes-e45c021e1b8b.

kevinrenskers avatar Jun 24 '21 12:06 kevinrenskers