Skip to content

Commit

Permalink
Merge pull request #29 from nandodelauni/master
Browse files Browse the repository at this point in the history
Avoiding perform dismiss animation twice when `shouldDismissOnImageTap` is YES
  • Loading branch information
u10int committed Apr 23, 2014
2 parents 2600ce1 + f4c3f18 commit 9af2a76
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 9af2a76

Please sign in to comment.