


























在iOS6以后Orientation可以在plist文件里面进行设置。设置项是“Supported interface orientations”。
如果在iOS5或者一下版本UIViewController类默认支持Portrait only,要支持其他Orientation,需要重写 shouldAutorotateToInterfaceOrientation:方法。
- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orientation
{
return UIInterfaceOrientationIsPortrait(orientation); // only support portrait
return YES; // support all orientations
return (orientation != UIInterfaceOrientationPortraitUpsideDown); // anyting but
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。