Skip to content

Commit

Permalink
When shouldDismissOnImageTap is YES and you tap the image the animati…
Browse files Browse the repository at this point in the history
…on is performed twice with unpredictable results
  • Loading branch information
nandodelauni committed Apr 22, 2014
1 parent 2600ce1 commit f4c3f18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions URBMediaFocusViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,14 @@ - (void)handleDismissFromTap:(UITapGestureRecognizer *)gestureRecognizer {
if (self.shouldDismissOnTap) {
if (self.shouldDismissOnImageTap || !CGRectContainsPoint(self.imageView.frame, location)) {
[self dismissToTargetView];
return;
}
}

if (self.shouldDismissOnImageTap && CGRectContainsPoint(self.imageView.frame, location)) {
// we aren't allowing taps outside of image bounds to dismiss, but tap was detected on image view, we can dismiss
[self dismissToTargetView];
return;
}
}

Expand Down

0 comments on commit f4c3f18

Please sign in to comment.