MPMoviePlayerController隐藏下一个上一个按钮 [英] MPMoviePlayerController hide next prev buttons

查看:88
本文介绍了MPMoviePlayerController隐藏下一个上一个按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在苹果MPMoviePlayerController上是否有一种简单的方法(可能很hacky)隐藏下一个/上一个按钮?

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.

谢谢 亚历克斯

推荐答案

UIMoviePlayerController 实例的setControlStyle属性的样式设置为MPMovieControlStyleNone.

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

我猜想准确获取按钮的最好方法是创建自己的 UIView 子类,以处理控件的视觉效果,实现按钮您需要将它们放在自定义视图上,然后将自定义视图放在您的 MPMovieController的视图上.

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.

然后,您需要将Cutom视图按钮的目标和动作连接到使用

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.

这项工作将必须创建和定位您自己的 UIView 子类.您还应该注意以下事实:使用此方法的效率不如使用可以通过Apple的setControlStyle属性指定的内置控件.

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.

这篇关于MPMoviePlayerController隐藏下一个上一个按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆