【发布时间】:2014-07-07 11:57:00
【问题描述】:
我遇到了自动布局方向的问题。只是我正在推动视图控制器使用这行代码从 rootVC 控制
fooBar *foo = [[fooBar alloc]initWithNibName:@"fooBar" bundle:nil];
[self.navigationController pushViewController:foo animated:NO];
我的 fooBar 视图控制器具有自动布局,因此当我转动手机时我应该能够获得横向,但手机仍处于纵向模式。
另外奇怪的部分是我调试和下面的方法不起作用..(我把它们放到 fooBar VC)
(BOOL) shouldAutorotate{
return YES;
}
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
//returns true if want to allow orientation change
return TRUE;
}
构建选项 Ios SDK 6.0、Xcode 5.1
【问题讨论】:
标签: ios rotation orientation autolayout portrait