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

Categories

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

objective c - App not sized properly iOS 8 iPhone simulator

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.

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?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

You need to include Launch Images 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 launch image you will support iPhone5. For iPhone6 and 6Plus include launch images in the correct size. See https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...