MPMoviePlayerController 仅在全屏上旋转
我有一个表视图,其中包含 MPMoviePlayerController 的实例作为表头,当用户按下我的自定义覆盖按钮时,视频将扩展为全屏。视频的长宽比在纵向模式下非常小,我想大多数用户会旋转到横向。
问题是我想在视频全屏时允许旋转,但在视频退出时不允许旋转。我的基础表不支持横向。有没有办法只在全屏时支持旋转?我认为这将是 MPMoviePlayerController 的标准组件。
我使用的是 SDK 5.0,但它最初是用 4.3 构建的。
I have a table view that contains an instance of MPMoviePlayerController as the table header and when the user presses my custom overlay button, the video expands to full screen. The aspect ratio of the video is such that in portrait mode it is very small, and I imagine most users will rotate to landscape.
The problem is that I want to allow rotation when the video is full screen but not when it exits. My underlying table does not support landscape. Is there a way to support rotation only when full screen? I thought this would be a standard component of MPMoviePlayerController.
I'm using SDK 5.0, but it was originally built with 4.3.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过对
MPMoviePlayerController
MPMoviePlayerViewController
类进行子类化,并重写该方法:Have you tried subclassing the
MPMoviePlayerController
MPMoviePlayerViewController
class, and overriding the method: