Thumb image does not move to the edge of UISlider

后端 未结 9 1157
有刺的猬
有刺的猬 2021-02-13 02:14

Thumb image does not move to the edge even when it\'s value is max or min.

Does anyone know how to make it move all the way to the edge of the slider?

9条回答
  •  广开言路
    2021-02-13 03:12

    I found a simpler solution which also has a quite smooth UX.

    I basically just set the .highlighted image to the same value as that of the .normal. Here's the code.

        seekBar.setThumbImage(thumbImage, for: .normal)
        seekBar.setThumbImage(thumbImage, for: .highlighted)
    

提交回复
热议问题