简体   繁体   English

iOS 8故事板横向

[英]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. 我有我的应用程序(针对带有xCode 6的iOS 8开发)的肖像设计,我想同时针对肖像和风景设计。 What is the best way? 什么是最好的方法?

There is something like have 2 storyboards? 好像有2个故事板?

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. 最好的方法是利用iOS 8中提供的自适应布局。自适应布局允许您的应用根据屏幕尺寸,方向等进行更改。

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. 自动布局和大小类是ios 5之后的两个功能,它使用户可以根据需要定义视图的内容。 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. 雷·温德利希(Ray Wenderlich)的指南让我非常满意,我希望它也能对您有所帮助。 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. 稍后,有关“添加缺少的约束”或对自动布局具有深入了解之类的更多功能,请参阅Apple的文档 It also give the idea and make all the things clear. 它还可以给出想法并使所有事情变得清晰。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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