To what extent can the iOS Movie Player be customized and styled?

我与影子孤独终老i 提交于 2019-12-03 16:24:25

According to the MPMoviePlayerController class reference, "Consider a movie player view to be an opaque structure. You can add your own custom subviews to layer content on top of the movie but you must never modify any of its existing subviews."

So I would strongly recommend against trying to modify the existing top bar and instead set the controlStyle property to MPMovieControlStyleNone which completely hides all the default UI. Then, layer your own user interface views on top of the movie player's view. You'll have to re-implement some stuff, but the movie player controller exposes all its buttons' actions as methods (see the MPMediaPlayback protocol for play/pause/seeking/etc.) so this shouldn't be a big problem.

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