UISlider problem - how to identify the user releasing the slider button in iOS?

I can detect the value change event from UISlider, but now I need to detect the user releasing the slider button.

How to detect this event (or touch the slider contours)?

Should I use the "touch in" event to detect?

Thank.

+5
source share
4 answers

I did not work with sliders, however, since UISlider inherits from UIView, you can just click on touchhesBegan: and touchhesEnded: to complete your task.

+2
source

IB "Touch Up Inside" "Touch Up Outside" / viewController .

(, viewController),

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

UIControlEventTouchUpOutside UIControlEventTouchUpInside UISlider.

+2

UISlider UIControlEventValueChanged. continuous NO, , .

[mySlider addTarget:self action:@selector(myMethod) forControlEvents:UIControlEventValueChanged];
mySlider.continuous = NO;
+2

UIControlEventTouchDown, , . UIControlEventTouchUpInside, . , @JohnK

0

All Articles