如何在UISlider背景或滚动视图中放置大图像?

时间:2020-02-12 10:00:16

标签: ios swift uiscrollview customization uislider

我正在尝试构建下面的图像,但是不确定是否将UISlider放在UIScrollview内,还是完全跳过并支撑滑块。列需要水平移动,并且每次移动都会改变颜色。

enter image description here

1 个答案:

答案 0 :(得分:1)

Swift5

a simple way to  make this is, 
1. take a view container
2. You should use pan gesture recogniser to the timer view.
3. them add vertical lines with grey color.
4. as you move the timer view change the color of the line to orange.

Suggested readings: PanGesture recogniser, View transform.