-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix slider bug #65
Fix slider bug #65
Conversation
Who's qualified to review this? |
@hachibu usually @prabhatjha takes a look at the code or @marinhero who knows a little bit of Objective-c, I think 😄 |
@diegoserranoa cool, I assigned them to this. |
@@ -63,7 +63,8 @@ - (instancetype)initWithSuperview:(UIView *)superview viewController:(UIViewCont | |||
[self setThumbImage:image forState:UIControlStateHighlighted]; | |||
[self setTranslatesAutoresizingMaskIntoConstraints:NO]; | |||
[self addTarget:superview action:NSSelectorFromString(@"updateSliderScore:") forControlEvents:UIControlEventValueChanged]; | |||
UITapGestureRecognizer *gr = [[UITapGestureRecognizer alloc] initWithTarget:viewController action:NSSelectorFromString(@"sliderTapped:")]; | |||
UILongPressGestureRecognizer *gr = [[UILongPressGestureRecognizer alloc] initWithTarget:viewController action:NSSelectorFromString(@"sliderTapped:")]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So was it working with tap before but not with long press? Now it will work with long press but not tap ? @diegoserranoa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prabhatjha that's why I'm setting the minimumPressDuration
to 0 in the next line. So no matter if it's a tap or a long press, the sliderTapped
method would be called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Fix slider bug when first selecting 0 and then sliding to other values caused the SEND button not to be enabled.
Changes
Test
Internal Trello Ref: link