Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
824 views
in Technique[技术] by (71.8m points)

objective c - MPMoviePlayerController hide next prev buttons

is there an easy (maybe hacky) way to hide the next / prev buttons on apples MPMoviePlayerController?

i dont want to change the skin, just "hide" the skip buttons.

enter image description here

thanks Alex

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Set the style of the setControlStyle property of the UIMoviePlayerController instance to MPMovieControlStyleNone.

Edit:

I guess the best way to get the buttons exactly as you want would be to create your own UIView subclass that handles the visuals of the controls, implement the buttons that you're after, position them on your custom view, and then position your custom view over your MPMovieController's view.

You would then need to hook up the target and actions of your cutom view's buttons to a controller that uses the MPMediaPlayback functions to control the playback of your MPMoviePlayerController.

The work will come in having to create and position your own UIView subclass. You should also pay attention to the fact that using this method will not be as efficient as using the built-in controls that you can specify with Apple's setControlStyle property.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...