UISplitViewController 模式转场不旋转
我已经从 Xcode 4.2/iOS5 中的主详细信息模板创建了一个项目。我正在尝试从 splitviewcontroller 执行模态转场。我从我的detailviewcontroller.m 中调用以下内容:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.splitViewController performSegueWithIdentifier:@"DisplayLoginView" sender:self.splitViewController];
}
登录视图显示正常,但它不会旋转并保持纵向。关于如何让它自动旋转有什么想法吗?
I've created a project from the master detail template in Xcode 4.2/iOS5. I am trying to preform a modal segue from the splitviewcontroller. I call the following from my detailviewcontroller.m:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.splitViewController performSegueWithIdentifier:@"DisplayLoginView" sender:self.splitViewController];
}
The login view shows fine but it does not rotate and stays in portrait. Any ideas on how to get it to autorotate?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过为目标视图控制器实现自定义类并添加
shouldAutorotateToInterfaceOrientation: 方法确保它返回 YES。
I fixed this by implementing a custom class for the destination view controller and adding the
shouldAutorotateToInterfaceOrientation: method making sure it returned YES.