Skip to content

Commit

Permalink
Bugfix: Tapping of TSMessageView doesn't dismiss it
Browse files Browse the repository at this point in the history
Cause: Two tap gesture recognzier is added to the view which cancels the previous one
  • Loading branch information
schystz committed Mar 18, 2014
1 parent b9d9ee3 commit 51166e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TSMessages/Views/TSMessageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,11 @@ - (id)initWithTitle:(NSString *)title
[self addGestureRecognizer:tapRec];
}

UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
tapGesture.delegate = self;
[self addGestureRecognizer:tapGesture];
if (self.callback) {
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
tapGesture.delegate = self;
[self addGestureRecognizer:tapGesture];
}
}
return self;
}
Expand Down

0 comments on commit 51166e5

Please sign in to comment.