How to Detect Whether a User Has an iPhone 6 Plus in Standard or Zoomed Mode

How to determine if the iPhone 6+ (plus) is in Standard or Zoom mode

How about just checking the bounds (not nativeBounds) of the screen? IIRC, in zoom mode the bounds will be {375, 667} but in regular mode they are {414, 736}.

But yes, as mentioned in the comments.. if you are using AutoLayout, your app should "just" be able to adjust itself correctly and you shouldn't need to know.

How to detect iPhone 6 & 6 Plus View Mode Programmatically

You can use either [UIScreen mainScreen].nativeScale witch will gives you 2.6f if normal, and 2.8f if zoomed on iPhone 6 plus, or the defined macros :

#define IS_OS_8_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_IPHONE_5 (IS_IPHONE && ([[UIScreen mainScreen] bounds].size.height == 568.0) && ((IS_OS_8_OR_LATER && [UIScreen mainScreen].nativeScale == [UIScreen mainScreen].scale) || !IS_OS_8_OR_LATER))
#define IS_STANDARD_IPHONE_6 (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 667.0 && IS_OS_8_OR_LATER && [UIScreen mainScreen].nativeScale == [UIScreen mainScreen].scale)
#define IS_ZOOMED_IPHONE_6 (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0 && IS_OS_8_OR_LATER && [UIScreen mainScreen].nativeScale > [UIScreen mainScreen].scale)
#define IS_STANDARD_IPHONE_6_PLUS (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 736.0)
#define IS_ZOOMED_IPHONE_6_PLUS (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 667.0 && IS_OS_8_OR_LATER && [UIScreen mainScreen].nativeScale < [UIScreen mainScreen].scale)

Does iPhone 6 / 6 Plus simulator supports changing of Display Zoom mode?

Display Zoom is not available in the simulator (as of Xcode 6.0).

How to detect iPhone 6 or iPhone 6 Plus view size mode programmatically

This works for me tested in iphone 6+ and 6s+

if #available(iOS 8.0, *) {
print("ios greater than 8")
if(UIScreen.mainScreen().bounds.size.height == 667.0 && UIScreen.mainScreen().nativeScale < UIScreen.mainScreen().scale){
// iphone 6+ and 6s+ are in zoomed
print("iphone 6+ and 6s+ zoomed ")
}else{
// iphone 6+ and 6s+ are in standard
print("iphone 6+ and 6s+ standard ")
}
}else{
print("ios less than 8")
}

thanks @k8mil



Related Topics



Leave a reply



Submit