Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I detect whether a user has an iPhone 6 Plus in standard or zoomed mode?

How can I detect whether a user has an iPhone 6 Plus in standard or zoomed mode? Is this possible?

I've tried [UIScreen mainScreen].scale and it reports 3.0 in both cases.

like image 284
barfoon Avatar asked Sep 20 '14 18:09

barfoon


2 Answers

There's a new member

[[UIScreen mainScreen] nativeScale] 

which should do what you want. It's only available on iOS 8, so you'll need to guard it

like image 129
Paul Franceus Avatar answered Sep 18 '22 13:09

Paul Franceus


[UIScreen mainScreen].currentMode reports:

<UIScreenMode: 0x17802f240; size = 1242.000000 x 2208.000000> // STANDARD <UIScreenMode: 0x178226be0; size = 1125.000000 x 2001.000000> // ZOOMED 
like image 30
barfoon Avatar answered Sep 17 '22 13:09

barfoon