问题描述
要自定义UISlider的视觉外观,您可以设置缩略图和轨道图像。部分轨道图像被拉伸到适当的。从文档:
To customize the visual look of a UISlider you can set the thumb and track images. Part of the track images gets stretched to the appropriate with. From the documentation:
现在我的问题是我的可伸展区域需要超过1点宽。 (这是一个模式)不幸的是,1点宽度似乎是硬编码在SDK中。
Now the problem I have is that my stretchable region needs to be more than 1-point wide. (It's a pattern) Unfortunately the 1-point width seems to be hard coded in the SDK.
任何人有想法如何解决这个问题?或者我将从头开始编写自己的滑块吗?
Anyone having an idea how to work around this? Or will I have to write my own slider from scratch for this?
推荐答案
我相信你必须编写自己的滑块来做。似乎没有(公共)API来改变UISlider关于可伸展区域的行为。
I believe you'll have to write your own slider to do that. There seems to be no (public) API to change UISlider's behavior regarding the stretchable region.
这篇关于自定义UISlider外观的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!