【发布时间】:2013-12-03 08:52:12
【问题描述】:
我正在开发一个supports portrait and landscape modes 的应用程序。我正在使用auto layout to arrange my views。由于我阅读了许多帖子,并且我意识到开发人员通常使用以下方法之一。
1.第一种方法:
实现UIViewController:updateConstraints 方法并根据设备方向更新约束。
2。第二种方法:
实现UIViewController:viewWillLayoutSubviews 方法并根据设备方向更新约束。
谁能告诉我最好的使用方法是什么?我一直在寻找结合自动旋转和自动布局的最佳实践,但还没有。谢谢。
【问题讨论】:
标签: ios iphone autolayout device-orientation autorotate