Skip to content

Commit

Permalink
Fix issues MortimerGoro#160 and MortimerGoro#162: Delegate call multi…
Browse files Browse the repository at this point in the history
…ple time on single touch on iOS 9
  • Loading branch information
MortimerGoro committed Nov 16, 2015
1 parent e7f2819 commit 353902c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MGSwipeTableCell/MGSwipeTableCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ -(instancetype) initWithButtons:(NSArray*) buttonsArray direction:(MGSwipeDirect
_buttons = _fromLeft ? buttonsArray: [[buttonsArray reverseObjectEnumerator] allObjects];
for (UIView * button in _buttons) {
if ([button isKindOfClass:[UIButton class]]) {
[(UIButton *)button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
if (![[(UIButton *) button allTargets] containsObject:self]) {
[(UIButton *)button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
}
}
if (!differentWidth) {
button.frame = CGRectMake(0, 0, maxSize.width, maxSize.height);
Expand Down

0 comments on commit 353902c

Please sign in to comment.