Skip to content

Commit

Permalink
[ThumbTrack] Fix typos in comments
Browse files Browse the repository at this point in the history
Summary: Per Junius' suggestion.

Reviewers: O1 Material components iOS, randallli, junius

Reviewed By: O1 Material components iOS, randallli, junius

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1521
  • Loading branch information
Max Luzuriaga committed Aug 24, 2016
1 parent 19ab467 commit 5163f7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/private/ThumbTrack/src/MDCThumbTrack.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ - (instancetype)initWithFrame:(CGRect)frame onTintColor:(UIColor *)onTintColor {
_clearColor = [UIColor colorWithWhite:1.0f alpha:0.0f];

// We add this UIPanGestureRecognizer to our view so that any superviews of the thumb track know
// when we are dragging the thumb track, and can treat us accordingly. Specifically, without
// when we are dragging the thumb track, and can treat it accordingly. Specifically, without
// this if a ThumbTrack is contained within a UIScrollView, the scroll view will cancel any
// touch events sent to the thumb track whenever the view is scrolling, regardless of whether or
// not we're in the middle of dragging the thumb. Adding a dummy gesture recognizer lets the
// scroll view know that we are in the middle of dragging, so those touch events shouldn't be
// cancelled.
//
// Note that an alternative to this would be to set canCancelContentTouches = NO on the
// UIScrollView, but because we can't guarentee that the thumb track will always be contained in
// UIScrollView, but because we can't guarantee that the thumb track will always be contained in
// scroll views configured like that, we have to handle it within the thumb track.
_dummyPanRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:nil];
_dummyPanRecognizer.cancelsTouchesInView = NO;
Expand Down

0 comments on commit 5163f7d

Please sign in to comment.