我如何支持更高的iPhone 5屏幕尺寸? [英] How do I support the taller iPhone 5 screen size?

查看:135
本文介绍了我如何支持更高的iPhone 5屏幕尺寸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序显示信箱,我希望它能够正确拉伸以填满整个屏幕。我正在创建我的主窗口:

My app shows up letter boxed and I want it to stretch properly to fill the whole screen. I'm creating my main window with:

self.mainWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

但我仍然收到信箱行为。我需要设置一些其他设置来获取设备上的主屏幕的完整大小吗?

But I'm still getting the letter boxed behavior. Is there some other setting I need to set to get the full size of the mainScreen on the device?

如果可以,我试图避免使用任何启动图像。我试过这个:

I'm trying to avoid using any launch images if I can. I've tried this:

self.mainWindow.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

它似乎没有帮助。我查看了所有Info.plist选项,发现似乎没有任何匹配。

and it doesn't seem to help. And I've looked through all the Info.plist options and found nothing that seems to match.

推荐答案

我不支持您出于某种原因避免启动图像的想法,但是如果您真的想要出于某种原因这样做,那么您应该使用 Default-568h@2x.png 文件(640x1136像素)与创建新项目时的文件类似。它只是纯黑色,不占用大量磁盘空间,看起来好像没有任何发射图像。

I don't support your idea of avoiding launch images as they are there for a reason, but if you really wanna do it for some reason, you should use the Default-568h@2x.png file (640x1136 px) like the one you get when creating a new project. It's just solid black, doesn't take up a lot of disk space and will look as if there are no launch images whatsoever.

除了设置4英寸视网膜发射图片,目前没有已知的方法可以在新屏幕上获得完整的1136像素高度。

Besides setting a 4-inch retina launch image, there is currently no known way to get full 1136 px height on the new screen.

这篇关于我如何支持更高的iPhone 5屏幕尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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