简体   繁体   中英

iOS: test app for iPhone in iPad, screen size

我有一个愚蠢的问题:为什么当我在iPad上调试iPhone的应用程序时,模拟在iPhone 4屏幕而不是其他类型的屏幕上开始?

If I understand you correct, please use this button to choose which one you want to use in simulator :

在此处输入图片说明

when you click you should able to see some list like this :

在此处输入图片说明

If you're not able to see other iOS version you can add them in Xcode/Preferences/Downloads section :

在此处输入图片说明

please let me not if you're not asking this.

To set the App to work on a different size screen you must add that screen size to the LaunchImage asset.

1) Create an splash screen launch image for the size of the iPad you want to use.

2) Import it into your project

3) Open images.xcassets in the Project Navigator

在此处输入图片说明

4) Select LaunchImage

5) Drag and drop the splash screen launch image to the correct iPad asset

在此处输入图片说明

It is very frustrating and seems strange, but the Launch Image size tells the App what dimension it can run on. Setting image sizes in your screen or using auto layout won't work unless that Launch Image size has a splash screen

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM