开发者

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 "h开发者_Python百科ide" the skip buttons.

MPMoviePlayerController hide next prev buttons

thanks Alex


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.


Do like this,

MPMoviePlayerViewController *movie = [[MPMoviePlayerViewController alloc] initWithContentURL:url];

movie.view.frame = CGRectMake(0, 0, width, height);

[movie.moviePlayer setControlStyle:MPMovieControlStyleNone];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜