简体   繁体   English

UISlider自定义拇指图像大小调整问题

[英]UISlider Custom Thumb Image Resizing Issue

I want to get directions for following two issues related to UISlider control customization. 我想获得以下与UISlider控件自定义相关的两个问题的指导。

Issues#1: I just updated the UISlideThumbImage as seen in following screenshot. 问题#1:我刚刚更新了UISlideThumbImage,如以下屏幕截图所示。 As thumb image is in retina display, so its large image; 由于拇指图像在视网膜显示中,因此其大图像; My question is how we can resize the thumb image? 我的问题是我们如何调整拇指图像的大小? I don't want to resize thumb image PNG. 我不想调整缩略图PNG的大小。 If i will do that then on retina display screens, it will seems blur. 如果我要这样做,那么在视网膜显示屏上,似乎会模糊。 在此处输入图片说明

Issue#2: Default clickable area of thumb image of slider is 23x23. 问题2:滑块的缩略图的默认可点击区域为23x23。 How we can increase that area? 我们如何扩大面积? So that we can adjust it according to the size of thumb image. 这样我们就可以根据拇指图像的大小进行调整。 Currently, if i will move finger in 23x23 bounds, it will start sliding but if out side of that bound, it will not move but i also want to move the thumb if i will slide on any place of the thumb image. 当前,如果我将手指移动到23x23范围内,它将开始滑动,但是如果超出该范围,它将不移动,但是如果我要在拇指图像的任何位置滑动,我也想移动拇指。

Your important suggestions will be move helpful in this regards. 您的重要建议将在这方面有所帮助。 Is there any third party library present which will do it more efficiently regardless of doing it ourself and spend more time over it? 现在有没有第三方图书馆可以更有效地执行此操作,而无需我们自己进行操作并在上面花费更多的时间?

From my experience with customising UISlider, It's better just not using the default one. 根据我自定义UISlider的经验,最好不要使用默认的UISlider。 There is a open source Range Slider: 有一个开源的Range Slider:

https://github.com/muZZkat/NMRangeSlider https://github.com/muZZkat/NMRangeSlider

And notice there is a option to remove the lower thumb so you acutely have a regular customising UISlider 并注意有一个选项可以去除下拇指,因此您可以定期使用自定义UISlider

"(New) Disable lower handle so it behaves like a regular UISlider but still use other features." “(新)禁用下部手柄,因此其行为类似于常规的UISlider,但仍使用其他功能。”

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

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