ios如何实现优酷视频播放时的效果
PHP中文网
PHP中文网 2017-04-17 15:40:58
0
2
311

主要是有两个点:

  1. 如何实现播放的时候在设备横过来的时候自动全屏

  2. 在设备横过来并全屏状态下,点击返回按钮,会自动先变回竖屏(然而设备还是横屏状态)

对于1,我基本能实现,是通过willAnimateRotationToInterfaceOrientation回调来调整实现的;对于2,不知道如何实现啊。网上说不能调整UIDeviceorientation,有被拒的风险。

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
阿神

Use the gyroscope value to calculate whether the device is in landscape orientation.
This allows for flexible control when the device is tilted.

Ty80

Answer to your second point: Youku changed the screen orientation with code... Give it a try, you shouldn't be rejected.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!