0

我看到很多人都在使用下面的代码viewDidLoad来旋转他们的对象,但是 xcode 最初没有办法做到这一点吗?

如果没有,最有效/最好的方法是什么?

谢谢你。

4

2 回答 2

2

Interface Builder 目前不支持在视图(或其支持层)上设置转换。你一定要通过代码来做到这一点。

于 2012-06-13T14:19:29.293 回答
0

You can set base view to landscape in the interface builder and build it like that. So everything will be rotated 90 degrees. Also do not forget to edit your shouldAutorotateToInterfaceOrientation method. In the case that you only want to rotate some objects and not all of them you are going to have to go with the transforms as Cyrille said.

于 2012-06-14T11:24:09.437 回答