我的项目中有一个表视图控制器(根)和5个视图控制器 . 视图控制器仅转向横向视图(如我所愿),但不转向表视图控制器(仅在纵向视图中) . 在支持的设备方向中,我删除了纵向和颠倒,我在每个类中编写:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {return((interfaceOrientation == UIInterfaceOrientationLandscapeLeft)||(interfaceOrientation == UIInterfaceOrientationLandscapeRight));
任何使表格视图的建议仅转向横向视图?
1 回答
把它放在viewDidLoad中