应用程序的大小不正确iOS 8 iPhone模拟器 [英] App not sized properly iOS 8 iPhone simulator

查看:136
本文介绍了应用程序的大小不正确iOS 8 iPhone模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定从头开始重写我的一个应用程序来清理代码&也许是为iOS 8优化它,但是当我在iPhone模拟器中运行新版本时,分辨率似乎不正确。应用程序的顶部和底部边缘都有信箱,但即使在相同的Xcode 6模拟器上运行,旧版本也没有。

I decided to rewrite one of my apps from scratch to clean up the code & perhaps optimize it for iOS 8, but when I run the new version in the iPhone simulator the resolution doesn't seem to be correct. There is letterboxing around the top and bottom edges of the app, but the old version doesn't have that even when run on the same Xcode 6 simulator.

即使我我正在使用iPhone 5模拟器(应该是640 x 1136), [[UIScreen mainScreen]界限] .size 的输出是640 x 960.每个模拟器似乎以iPhone 4分辨率运行应用程序。可能导致此问题的任何想法?

Even though I'm using the iPhone 5 simulator (which should be 640 x 1136), the output of [[UIScreen mainScreen] bounds].size is 640 x 960. Every simulator just seems to be running the app at the iPhone 4 resolution. Any ideas what might be causing this?

推荐答案

您需要为要支持的所有分辨率包含LaunchScreens。默认值仅为640 x 960.如果您将分辨率为640 x 1136的图像作为launchScreen包含,则您将支持iPhone5。对于iPhone6和6Plus,包括正确尺寸的发射屏。请参阅 https://developer.apple.com/library/ ios / documentation / UserExperience / Conceptual / MobileHIG / IconMatrix.html

You need to include LaunchScreens for all the resolutions you want to support. Default is only 640 x 960. If you include an image with the resolution of 640 x 1136 as a launchScreen you will support iPhone5. For iPhone6 and 6Plus include launchscreens in the correct size. See https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html

这篇关于应用程序的大小不正确iOS 8 iPhone模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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