UISplitViewController 模式转场不旋转

发布于 2025-01-07 07:12:41 字数 374 浏览 4 评论 0原文

我已经从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉城已无爱 2025-01-14 07:12:41

我通过为目标视图控制器实现自定义类并添加
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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文