【问题标题】:Movieplayer doenst rotate anymore when I used setControlStyleNone当我使用 setControlStyleNone 时,电影播放器​​不再旋转
【发布时间】:2010-06-08 12:34:58
【问题描述】:

我在初始化电影时将此添加到我的代码中

[m_pMPmpc.movi​​ePlayer setControlStyle:MPMovieControlStyleNone];

其中 m_pMPmpc 是一个 MPMoviePlayerViewController

它工作得很好,但后来我注意到电影在播放时不再旋转(但电影之后的应用程序仍然旋转)但它在开始时检测到方向并遵循它。

我需要将其设置为在播放时遵循横向方向。知道要添加什么代码吗?

【问题讨论】:

    标签: iphone objective-c movieplayer


    【解决方案1】:

    尝试创建 MPMoviePlayerViewController 的子类并覆盖 shouldAutorotateToInterfaceOrientation 以在方向为横向时返回 yes。实例化您的类而不是默认的 MPMoviePlayerViewController。

    它对我有用。

    【讨论】:

      猜你喜欢
      • 2021-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-03
      • 2013-05-16
      • 2012-10-02
      • 2019-11-04
      相关资源
      最近更新 更多