简体   繁体   中英

iOS 8 Storyboard Landscape

i have my app (developed for iOS 8 with xCode 6) design in portrait and i want to design for both, portrait and landscape. What is the best way?

There is something like have 2 storyboards?

Thanks for all.

The best way would be to make use of the adaptive layouts available in iOS 8. Adaptive layouts allows your app to change depending on screen size, orientation etc.

There is a lot of documentation on Apple's developer website and I think the subject is too broad to answer specifically how to do it here.

What you need to learn is specifically, auto layout. Auto layout and size classes are two features came after ios 5 that allows user to define the contents of views in whatever they want. All you will need to use some constraints.

Using constraints might be really hard at the first place. But it is also not the hardest thing ever and actually it is something developers should know.

Ray Wenderlich's guide was really satisfied me and I hope it will help you too. It really gives the idea. So please refer to those links, which is his tutorial:

Part I

Part II

Take your time while reading, dont hurry. It is quite long. However, you really need much as anyone, so you better learn well.

Later, for further features like "adding missing constraints" or deep understanding that auto layout has, please refer to Apple's documentation on it. It also give the idea and make all the things clear.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM