Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

ios - Xcode 6 resizes app automatically for iPhone 6 and 6 plus

I was developing app in Xcode 5 for iOS 7 on iPhone 5 inch storyboard. I prepared my app and its buttons, images and other stuff to fit iPhone 5 screen size, and then programmatically optimized app to fit iPhone 4 and 4s.

And then Xcode 6 came, and two new devices, iPhone 6 and iPhone 6 plus. I was thinking that i will have to spend few hours again to programmatically optimize app for those resolutions.

But i tried run my app on my new iPhone 6 and strange thing happened. App itself made everything for me. Everything was in right position and right size and i haven't done anything.

I saw that Xcode 6 now uses Size Classes to develop app for multiple devices.

But i am not using Size Classes and Auto Layout in my project and it works?

I opened new project then. In my new project resizing is not working like this anymore. So it won't resize my buttons, views and other stuff automatically.

Has anyone have any idea what is happening?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

If you don't use a launch story board or include launch images for the new iPhone 6 sizes, the entire screen will expand to fill the new device size (same thing happens when enabling Zoom in accessibility settings). The iPhone 6 user will notice larger fonts, images, etc.

This is what's happening. The problem is that you don't get to take advantage of extra screen real estate (extra pixels). If that's cool with you, then keep it, but when you do finally optimize your app to use that extra real-estate the iPhone 6 users will suddenly complain that the font size has gotten smaller when it stops auto-zooming.

You should spend the time to optimize it for iPhone 6 and include launch images (or launch story board if supporting iOS 8+ only), and get the "Optimized for iPhone 6" note added to your app description.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...