Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
427 views
in Technique[技术] by (71.8m points)

objective c - How do I support the taller iPhone 5 screen size?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...