How do I support the taller iPhone 5 screen size?

元气小坏坏 提交于 2019-12-17 09:32:52

问题


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;

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


回答1:


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.

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



来源:https://stackoverflow.com/questions/12397811/how-do-i-support-the-taller-iphone-5-screen-size

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