search

Home  >  Q&A  >  body text

iOS如何判断竖排方向锁定

iOS中如何判断竖排方向锁定呢,需求是横屏时让播放的视频全屏,根据重力感应,但是跟这个开关有关系。

高洛峰高洛峰2866 days ago861

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-18 09:45:54

    According to normal thinking, there will be a notification when the device is rotated UIDeviceOrientationDidChangeNotification Monitor it
    Then you can judge the direction of the device and adjust your video playback

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:45:54

    You can still judge even if it is locked: https://github.com/oopsr/Devi...

    reply
    0
  • Cancelreply