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

Categories

0 votes
874 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...