UISwitch带有自定义图像 [英] UISwitch with custom image

查看:564
本文介绍了UISwitch带有自定义图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过更改背景颜色以及旋钮(支架)图像来自定义UISwitch,如下图所示。是否可以自定义UISwitch而不会被app拒绝。

I need to customize UISwitch by changing background color as well as knob(holder) image as shown in below image.Is it possible to customize UISwitch without app getting rejected.

提前致谢

推荐答案

您可以在UISwitch上设置 onTintColor 属性。如果您还需要更改手柄图像,请查看 DCRoundSwitch

There's an onTintColor property you can set on UISwitch. If you need to change the handle image as well, have a look at DCRoundSwitch.

这篇关于UISwitch带有自定义图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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