我有3个视图,我希望使用自动布局约束来处理它们的布局。 肖像是这样的:
和景观应如下:
如何使用autolayout执行此操作?我尝试添加约束,但第三个视图(绿色),不会向上移动。它虽然在右侧移动。
我哪里出错了?我该如何解决?
答案 0 :(得分:3)
可以使用大小类轻松完成,看一下apple doc Size Classes design help
此功能仅适用于xCode 6 New Features in xCode 6。
对其他布局保持相同的约束。
请注意,当前布局未安装灰色约束。
您可以在链接DownLoad Sample
中找到该示例