推送视图控制器不旋转

发布于 2024-12-21 00:36:00 字数 329 浏览 2 评论 0原文

我的应用程序中有两个子视图。

顶部是工具栏,底部是导航控制器。

在导航控制器中,我有一个表,每个单元格都将其推送到带有 YouTube 视频的新视图控制器。问题是视频不旋转。

当我在视频 viewController 中并旋转应用程序时,表格会收到 AutoRotate 事件。

当我弹出视图时,我可以看到事件发生在桌子上,并且桌子是横向的。这只是一个测试,因此事件应该实时将视频旋转到正确的视图。

我发现有几篇文章说,当 ViewController 不是 rootViewController 时,它不会倾斜。

如何响应视频事件而不是桌面事件?

I have two subviews in my app.

At the top is a toolbar and in the bottom is a navigation controller.

In the navigation controller I have a table which every cell push to a new view controller with a youtube video. The problem is that the video doesn't rotate.

When I am in the video viewController and rotate the app, the table gets the AutoRotate event.

When I pop the view I can see that the event happened on the table and the table is in landscape. It was just a test, so in real time the event should rotate the video to the right view.

I have found a couple of articles which say that the ViewController won't tilt when it's not the rootViewController.

How can I respond to the video event instead of the table event?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文