UISlider events

前端 未结 4 2089
轮回少年
轮回少年 2021-02-05 09:12

I\'m using an UISlider, its updated automatically except the user is touching the sliderbutton. therefore i did this in the function which updates automatically by an NSTimer:

4条回答
  •  隐瞒了意图╮
    2021-02-05 09:49

    You can use:

    - (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents

    to detect when the touchDown and touchUp events occur. You can set your flag accordingly.

    I'm guessing from your code snippet that you are using a UISlider as a progress meter. Have you considered using a UIProgressView instead?

提交回复
热议问题