To what extent can the iOS Movie Player be customized and styled?
I am trying to accomplish something similar to the image below. That is, I would like to add a slide-out overlay navigation bar and other overlay functionality as well. In general I would also just like to know what kind customization is possible with the Movie Player. Specifically, can I add/remove buttons from the top bar, how would I add those dots to the playback bar? Thanks!
http://blog.howcast.com/wp-content/uploads/2010/06/ipad开发者_如何学Go-video.png
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.
精彩评论