支持iPhone视图上的自动旋转

问题描述:

要支持所有视图的自动旋转,应该怎么做?支持iPhone视图上的自动旋转

请参见本教程。这帮助我理解了Autorotation和Autosizing Options。

http://www.bogotobogo.com/XcodeSDK-Chapter4.html

+0

有关更新版本,请参阅本教程所基于的“开始iOS 5开发:探索iOS SDK”的第5章。 – user456584 2012-12-06 02:48:27

把它放在你所有的视图控制器中。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
     return YES; 
    } 
+1

那么如何滚动一些意见。所有的自定义视图是否也会自行调整? – Abhinav 2011-04-01 20:54:26