How to add support for 10.5 inch iPad Pro

安稳与你 提交于 2019-12-12 07:13:05

问题


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?

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


回答1:


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.

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.




回答2:


The workaround for now seems to be to go back to using individual launch images rather than a launch screen storyboard.

(This thread on Twitter had the answer. Also I took a look at the Info.plist file for Linea, and that seems to be exactly how they've achieved it).



来源:https://stackoverflow.com/questions/44392646/how-to-add-support-for-10-5-inch-ipad-pro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!