如何添加对10.5英寸iPad Pro的支持 [英] How to add support for 10.5 inch iPad Pro

查看:57
本文介绍了如何添加对10.5英寸iPad Pro的支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从MAS下载了最新的Xcode 8.3.3更新. 我想知道如何增加对新的10.5英寸iPad Pro的支持?

I've just downloaded the latest Xcode 8.3.3 update from the MAS. I was wondering how to add support for the new 10.5-inch iPad Pro?

我正在使用具有自动布局的情节提要,启动屏幕情节提要和所有应用程序图标大小均已添加到xcassets.

I'm using storyboards with auto-layout, a launch screen storyboard and all app icon sizes are added to the xcassets.

推荐答案

我认为,自动布局启动屏幕故事板应该是所有需要的东西.但是,我发现如果在Xcode 8.3.3下构建应用程序,则UIScreen.mainScreen.bounds返回736 x1024.如果在Xcode 9和iOS 11 SDK beta下构建相同的应用程序,则UIScreen.mainScreen.bounds将返回834 x 1112.

I believe that the auto-layout launch screen story board should be all that is needed. However, I have found that if I build an application under Xcode 8.3.3, the UIScreen.mainScreen.bounds returns 736 x 1024. If I build the same application under Xcode 9 and the iOS 11 SDK beta, UIScreen.mainScreen.bounds returns 834 x 1112.

更新:
正如其他人提到的那样,当使用Xcode 8.3.3/iOS 10.3构建应用程序并在iPad Pro 10.5模拟器上运行时,应用程序信息列表中的UIRequiresFullScreen键确定应用程序是否缩放为768 x 1024.如果UIRequiresFullScreen = YES,则缩放应用程序.如果UIRequiresFullScreen = NO,则应用为全分辨率(834 x 1112).
但是,如果该应用程序是使用Xcode 9/iOS 11 beta 1构建的,则无论UIRequiresFullScreen键设置如何,该应用程序始终以完整的本机分辨率运行.一些开发人员认为这是故意的行为,而不是错误.其他人则认为,这仅仅是在iOS 11模拟器下运行iOS 10应用程序的产物.在开发人员收到新硬件之前,我们可能不确定.

UPDATE:
As others have mentioned, when an app is built with Xcode 8.3.3/iOS 10.3 and is running on the iPad Pro 10.5 simulator, the UIRequiresFullScreen key in the app info.list determines whether or not the app is scaled to 768 x 1024. If UIRequiresFullScreen = YES, the app is scaled. If UIRequiresFullScreen = NO, the app is full resolution (834 x 1112).
However, if the app is built with Xcode 9/iOS 11 beta 1, it always runs at the full native resolution regardless of the UIRequiresFullScreen key setting. Some developers believe that this is intentional behavior and not a bug. Others believe it is simply an artifact of running the iOS 10 app under the iOS 11 simulator. We probably won't know for sure until developers receive the new hardware.

这篇关于如何添加对10.5英寸iPad Pro的支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆