【发布时间】:2011-04-07 21:40:13
【问题描述】:
我有一个 UIViewController 想用[self presentModalViewController:settingsController animated:YES] 显示。
我的应用程序处于横向模式。当我使用presentModalViewController 时,视图会从侧面滑入,就好像它处于纵向模式一样。当我使用addSubview: 添加视图时,它会正确显示在屏幕上。
我确实在我的视图控制器中使用了shouldAutorotateToInterfaceOrientation,但它似乎对解决这个问题没有帮助。
- (BOOL)shouldAutorotateToInterfaceOrientation (UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
有没有人遇到过这个或者知道我哪里出错了?
【问题讨论】:
标签: iphone ios view orientation landscape