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.
I did not work with sliders, however, since UISlider inherits from UIView, you can just click on touchhesBegan: and touchhesEnded: to complete your task.
IB "Touch Up Inside" "Touch Up Outside" / viewController .
(, viewController),
- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents
UIControlEventTouchUpOutside UIControlEventTouchUpInside UISlider.
UIControlEventTouchUpOutside
UIControlEventTouchUpInside
UISlider UIControlEventValueChanged. continuous NO, , .
UIControlEventValueChanged
continuous
[mySlider addTarget:self action:@selector(myMethod) forControlEvents:UIControlEventValueChanged]; mySlider.continuous = NO;
UIControlEventTouchDown, , . UIControlEventTouchUpInside, . , @JohnK
UIControlEventTouchDown