From f4c3f187586c317de97e751c7715a57fe8a820da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Ferrando=20Navalo=CC=81n?= Date: Tue, 22 Apr 2014 17:43:37 +0200 Subject: [PATCH] When shouldDismissOnImageTap is YES and you tap the image the animation is performed twice with unpredictable results --- URBMediaFocusViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/URBMediaFocusViewController.m b/URBMediaFocusViewController.m index 2944790..8e3db75 100644 --- a/URBMediaFocusViewController.m +++ b/URBMediaFocusViewController.m @@ -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; } }