2

作为此问题的后续问题,我想知道您是否能够检测(在 iOS 应用程序或应用程序扩展中)该应用程序是否没有针对新的屏幕尺寸进行更新并且正在“缩放”模式下运行或不是。

我知道有[UIScreen mainScreen].nativeScale[UIScreen mainScreen].scale但到目前为止,我还无法检测到一个已正确更新的应用程序和一个尚未缩放且正在运行的应用程序之间的上下文。

有谁知道这样做的机制?

4

1 回答 1

1

In order to detect whether the host app is running in zoom mode from within a keyboard extension, use self.view.frame.size.width It returns 320 when the app is in zoomed mode & 414 for standard mode on my 6+

于 2015-07-22T06:43:43.370 回答