Skip to content

Commit 71315cb

Browse files
Fix touch to seek flicker on iOS (#136)
1 parent 9e0c058 commit 71315cb

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/ios/RNCSlider.m

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,11 @@
1010
@implementation RNCSlider
1111
{
1212
float _unclippedValue;
13-
UITapGestureRecognizer * tapGesturer;
1413
}
1514

1615
- (instancetype)initWithFrame:(CGRect)frame
1716
{
18-
self = [super initWithFrame:frame];
19-
if (self) {
20-
tapGesturer = [[UITapGestureRecognizer alloc] initWithTarget: self action:@selector(tapHandler:)];
21-
[tapGesturer setNumberOfTapsRequired: 1];
22-
[self addGestureRecognizer:tapGesturer];
23-
}
24-
return self;
25-
}
26-
- (void)tapHandler:(UITapGestureRecognizer *)gesture {
27-
CGPoint touchPoint = [gesture locationInView:self];
28-
[self setValue:touchPoint.x / self.bounds.size.width animated: YES];
17+
return [super initWithFrame:frame];
2918
}
3019

3120
- (void)setValue:(float)value

0 commit comments

Comments
 (0)