UISlider 上的端盖
我有一个 UISlider,我不想对其进行自定义外观。我使用了 setMaximumTrackImage:
方法,但我的滑块边缘有一个边框,我不希望滑块能够占据该边框。我尝试设置 MaximumValueImage,但这会在滑块和上限之间产生间隙,如下所示:
如何创建一个具有上述端盖的滑块,但又不能让滑块在其上滑动?
I have a UISlider that I wan't to have a custom look for. I used the setMaximumTrackImage:
method, but I have a bezel on the edge of my slider that I dont want the slider to be able to occupy. I tried setting the maximumValueImage, but that creates a gap between the slider and the cap like so:
How can I create a slider that has the end cap like above, but keep the slider from being able to slide over it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将背景添加为单独的容器视图,其宽度大于 UISlider。删除您的最大 TrackImage。
Add the background as a separate container view with greater width that the UISlider. Eemove your maximumTrackImage.