DeviceKit icon indicating copy to clipboard operation
DeviceKit copied to clipboard

isZoomed wrong value for iPhone X

Open Tulleb opened this issue 5 years ago • 4 comments

From the console, when doing it on a real iPhone X device having Display Zoomed enabled (iOS 14+):

(lldb) po DeviceKit.Device.current.isZoomed
▿ Optional<Bool>
  - some : false

Tulleb avatar Oct 21 '20 19:10 Tulleb

It looks like it's treating all devices with a scale of 3 as if they are doing the scaling trick that the "plus" devices do. I think isZoomed is probably wrong for a lot of modern devices.

I don't see any property exposed currently that distinguishes the devices doing this scaling trick, seems like something worth adding? At first glance I don't see an obvious way to determine this from scale and nativeScale, given that those values will change based on zoom mode. So maybe we need to maintain a new set of devices, allNonNativeScaleDevices or something?

clindsay3 avatar Jan 17 '22 14:01 clindsay3

Just doing some testing now and can confirm iPhone 13 Pro Max is returning false for isZoomed even though it is zoomed (in Simulator).

(lldb) po UIScreen.main.nativeScale
3.424

(lldb) po UIScreen.main.scale
3.0

ricsantos avatar Sep 23 '22 05:09 ricsantos

I'm having similar issues. My device is an iPhone 11 Pro running iOS 16.1, and it is returning false when in fact have Display Zoomed set to Large text.

Scale 3.000000
Native scale 3.515625

joostfunkekupper avatar Apr 20 '23 02:04 joostfunkekupper

i'm have same issues. device is iPhone x, os is 15.6. device is zoom mode, but isZoomed return false.

mrjlovetian avatar Oct 13 '23 09:10 mrjlovetian