iPhone 6s Plus在横向上具有紧凑的水平尺寸等级 [英] iPhone 6s Plus has Compact horizontal size class in landscape orientation
问题描述
我有一个iPhone 6s Plus,我有一个同时支持纵向和横向的应用程序.
I have an iPhone 6s Plus, and I have an app that supports both Portrait and Landscape orientations.
旋转设备并读取属性mainViewController.traitCollection.horizontalSizeClass时-它始终等于 UIUserInterfaceSizeClassCompact .
When I rotate my device and read the property mainViewController.traitCollection.horizontalSizeClass - it always equals UIUserInterfaceSizeClassCompact.
许多类似这样的资源: https://forums.developer.apple.com/thread/17085
或这样: http://useyourloaf.com/blog/size-classes/
告诉我们所有5.5英寸的iPhone在横向都具有常规的水平尺寸级别,但我的设备没有!
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!!!
在 iPhone 6 Plus模拟器或 iPhone 6s Plus模拟器上启动相同的应用程序会得出不同的结果:在这种情况下,水平尺寸类别在横向上是常规的,就像这样是预期的.
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?
推荐答案
iPhone 6和6 plus设备具有缩放"显示模式,该模式使逻辑屏幕尺寸变小,在设置->显示和亮度->显示缩放下
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
这会在横向模式下影响6尺寸以上设备的特征收集.这也是您在计算尺寸等时不应该执行设备检查代码的原因.
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.
这篇关于iPhone 6s Plus在横向上具有紧凑的水平尺寸等级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!