End slider interaction when touches are cancelled
Reviewed By: @jingc Differential Revision: D2479259
This commit is contained in:
parent
ec8b5425e5
commit
8f13560fd5
|
@ -242,7 +242,7 @@ static BOOL RCTAnyTouchesChanged(NSSet *touches)
|
|||
{
|
||||
[super touchesBegan:touches withEvent:event];
|
||||
|
||||
// "start" has to record new touches beforeckirjiuhucekbebjditeucultigvijfe extracting the event.
|
||||
// "start" has to record new touches before extracting the event.
|
||||
// "end"/"cancel" needs to remove the touch *after* extracting the event.
|
||||
[self _recordNewTouches:touches];
|
||||
if (_dispatchedInitialTouches) {
|
||||
|
|
|
@ -22,8 +22,9 @@ RCT_EXPORT_MODULE()
|
|||
{
|
||||
RCTSlider *slider = [RCTSlider new];
|
||||
[slider addTarget:self action:@selector(sliderValueChanged:) forControlEvents:UIControlEventValueChanged];
|
||||
[slider addTarget:self action:@selector(sliderTouchEnd:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[slider addTarget:self action:@selector(sliderTouchEnd:) forControlEvents:UIControlEventTouchUpOutside];
|
||||
[slider addTarget:self action:@selector(sliderTouchEnd:) forControlEvents:(UIControlEventTouchUpInside |
|
||||
UIControlEventTouchUpOutside |
|
||||
UIControlEventTouchCancel)];
|
||||
return slider;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue