【发布时间】:2014-04-07 12:24:06
【问题描述】:
我尝试了以下方法在我的一个视图上强制横向:
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationLandscapeLeft;
}
- (BOOL)shouldAutorotate{
return YES;
}
都没有工作。请注意,我正在模拟器和 iPhone 上进行测试
谢谢
【问题讨论】:
-
我正在使用 NavigationControler 推送视图。{UINavigationController *navigationController[[UINavigationController alloc]initWithRootViewController:[[MiddleViewController alloc] init]]; [self.windownavigationController];返回是;
标签: objective-c ios7 orientation xcode5.1