改变UIStepper的外观 [英] Change appearance of UIStepper
本文介绍了改变UIStepper的外观的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
UIStepper很方便,但我想改变它的外观,我需要有自定义图标而不是加号和减号,我也想改变控件的颜色。我怎样才能做到这一点?提前致谢!
UIStepper is very convenient but I want to change the appearance of it, I need to have customized icon not the plus and minus and also I want to change the color of the control. How can I achieve this? Thanks in advance!
推荐答案
您目前无法做到这一点。如果要自定义图标,则必须编写自定义 UIControl
对象。
You cannot presently do this. You'll have to write a custom UIControl
object if you want to customize the icons.
来自 UIStepper类参考,你唯一的参数可以改变
From the UIStepper Class Reference, the only parameters you can change are
continuous property
autorepeat property
wraps property
minimumValue property
maximumValue property
stepValue property
value property
你不能自定义图标。
但是,由于它是 UIView
的子类,您可以尝试更改 backgroundColor
。
However, since it is a subclass of UIView
, you can try changing the backgroundColor
.
这篇关于改变UIStepper的外观的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文