How to add a custom button to AVPlayerViewController?

烈酒焚心 提交于 2019-12-10 16:35:19

问题


Is there any way to add a 'skip 30 minutes back/forward' button to a subclassed AVPlayerViewController so it looks native (just like play/pause button)?


回答1:


There is actually no 'good' way of doing it. Apple keeps AVPlayerViewController simple and unfortunately unextensible.

The only thing you can do is set a custom overlaying view. But it doesn't solve the problem.

And docs say you shouldn't subclass AVPlayerViewController which means you either use it and accept as it is or write your own controller that manages an instance of AVPlayer and has everything you need.



来源:https://stackoverflow.com/questions/34209858/how-to-add-a-custom-button-to-avplayerviewcontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!