File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11
11
#import < React/RCTEventDispatcher.h>
12
12
#import " RNCSlider.h"
13
13
#import < React/UIView+React.h>
14
- #import " os/log.h"
15
14
16
15
@implementation RNCSliderManager
16
+ {
17
+ BOOL _isSliding;
18
+ }
17
19
18
20
RCT_EXPORT_MODULE ()
19
21
@@ -38,6 +40,11 @@ - (UIView *)view
38
40
}
39
41
40
42
- (void )tapHandler : (UITapGestureRecognizer *)gesture {
43
+ // Ignore this tap if in the middle of a slide.
44
+ if (_isSliding) {
45
+ return ;
46
+ }
47
+
41
48
// Bail out if the source view of the gesture isn't an RNCSlider.
42
49
if ([gesture.view class ] != [RNCSlider class ]) {
43
50
return ;
@@ -121,11 +128,13 @@ - (void)sliderValueChanged:(RNCSlider *)sender
121
128
- (void )sliderTouchStart : (RNCSlider *)sender
122
129
{
123
130
RNCSendSliderEvent (sender, NO , YES );
131
+ _isSliding = YES ;
124
132
}
125
133
126
134
- (void )sliderTouchEnd : (RNCSlider *)sender
127
135
{
128
136
RNCSendSliderEvent (sender, NO , NO );
137
+ _isSliding = NO ;
129
138
}
130
139
131
140
RCT_EXPORT_VIEW_PROPERTY (value, float );
You can’t perform that action at this time.
0 commit comments