简体   繁体   中英

Xcode : Why same storyboard design display differently on simulator and device?

I'm new to swift auto layout. I try to create a story board with simple view in it as below:

我的故事板

When I run this on ipad simulator, it display as below:

模拟器的显示

And when I run it on actual ipad (Air 2) it shown as below:

在此处输入图片说明 Is the top part of the display missing due to "1X" icon located on bottom right corner? how do I get rid of it?

Thanks

Is the top part of the display missing due to "1X" icon located on bottom right corner?

Nope :) 1x is appearing because you are running a iphone app on ipad simulator :) Check the application to universal app :) and 1x will be removed automatically and your view should be rendered fine :)

You might have to change the your project settings to "Universal". Go to your Project and click the Target. Then, under General->Deployment Info, change the Devices from "iPhone" to "Universal"

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