简体   繁体   English

更改AVPlayerViewController的播放控制按钮的着色颜色

[英]Changing playback control buttons tint color for AVPlayerViewController

I'm using a AVPlayerViewController, which by default provides playback controls. 我使用的是AVPlayerViewController,默认情况下提供播放控件。 But is there a way to change the tint color of button images. 但是有没有办法改变按钮图像的色彩。 在此处输入图片说明

For eg. 例如。 I would like to change the play button and fullscreen button image tint color to white. 我想将播放按钮和全屏按钮图像色调颜色更改为白色。

You can't customize the default media control of the AVPlayer. 您无法自定义AVPlayer的默认媒体控件。 What you can do is create an AVPlayerLayer with your own custom controls and interact with the AVPlayer. 您可以做的是使用您自己的自定义控件创建一个AVPlayerLayer并与AVPlayer进行交互。

There is a project called Clappr with a custom media control that you can take a look to see how it works, and even change the UI as you want for your own project. 有一个名为Clappr的项目,带有一个自定义媒体控件,您可以看一下它的工作原理,甚至可以根据需要更改自己的项目的UI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM