Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kevinrenskers opened this issue Jun 24, 2021 · 1 comment
Open

Comments

@kevinrenskers
Copy link

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant