Search code examples
iosiphonedevice-orientation

iPhone 6s Plus has Compact horizontal size class in landscape orientation


I have an iPhone 6s Plus, and I have an app that supports both Portrait and Landscape orientations.

When I rotate my device and read the property mainViewController.traitCollection.horizontalSizeClass - it always equals UIUserInterfaceSizeClassCompact.

Many sources like this: https://forums.developer.apple.com/thread/17085
or this: http://useyourloaf.com/blog/size-classes/
tell that all 5.5-inch iPhones have Regular horizontal size class in the landscape orientation, but my device doesn't!!!

Launching the same app on the iPhone 6 Plus Simulator or the iPhone 6s Plus Simulator gives different results: in this case horizontal size class is Regular in landscape, like it was expected.

I wonder, what could it be? Any guesses?


Solution

  • iPhone 6 and 6 plus devices have a "Zoomed" display mode which makes the logical screen size appear smaller, under settings -> Display and Brightness -> Display Zoom

    This affects the trait collection of a 6 plus sized device when in landscape mode. It's also a reason you shouldn't do device checking code when calculating sizes etc.