【问题标题】:MPMoviePlayerController interface orientation change in full screenMPMoviePlayerController 全屏界面方向变化
【发布时间】:2012-08-09 14:15:27
【问题描述】:

我在视图中添加了 MPMoviePlayerController。并且工作正常。当我全屏切换到此并更改设备的方向时,不会触发方向更改事件。所以请告诉我我是如何解决这个问题的。

谢谢

【问题讨论】:

    标签: iphone ios4 mpmovieplayercontroller uiinterfaceorientation interface-orientation


    【解决方案1】:

    我想您以模态方式呈现 MPMoviePlayerController,所以请查看 -

    (void)shouldAutorotateToInterfaceOrientation: 主应用控制器的方法。我想如果您返回 TRUE 只是为了纵向,模态控制器无法自行旋转。尝试为 rootViewController 上的所有界面方向返回 TRUEMPMoviePlayerController 应该开始旋转。

    【讨论】:

    • 其实我没有使用modelviewcontroller。我为此使用了 addsubview 。相同的视频以小尺寸和全屏显示。在全屏模式下,我只是为此设置 isfullscreen=true。谢谢
    • 抱歉,我混淆了 MPMoviePlayerViewController,但 MPMoviePlayerController 公开了视图,因此如果托管视频的 viewController 正确旋转,您应该能够看到它旋转了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-08
    • 2012-08-12
    相关资源
    最近更新 更多