From bd0d0eb10483bb7a207a026596a79e63a14bd57b Mon Sep 17 00:00:00 2001 From: Tanguy G <7anguy@gmail.com> Date: Mon, 15 Sep 2014 16:04:33 +0200 Subject: [PATCH] Bug fix : Overlay view could stay on top, freezing the whole UI Bug fix : Overlay view could stay on top, freezing the whole UI. --- QBPopupMenu/QBPopupMenu.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/QBPopupMenu/QBPopupMenu.m b/QBPopupMenu/QBPopupMenu.m index 5f1320f..2a918f8 100644 --- a/QBPopupMenu/QBPopupMenu.m +++ b/QBPopupMenu/QBPopupMenu.m @@ -172,6 +172,7 @@ - (void)showInView:(UIView *)view targetRect:(CGRect)targetRect animated:(BOOL)a // Show [view addSubview:self.overlayView]; + self.visible = YES; if (animated) { self.alpha = 0; @@ -180,7 +181,6 @@ - (void)showInView:(UIView *)view targetRect:(CGRect)targetRect animated:(BOOL)a [UIView animateWithDuration:kQBPopupMenuAnimationDuration animations:^(void) { self.alpha = 1.0; } completion:^(BOOL finished) { - self.visible = YES; // Delegate if (self.delegate && [self.delegate respondsToSelector:@selector(popupMenuDidAppear:)]) { @@ -190,8 +190,6 @@ - (void)showInView:(UIView *)view targetRect:(CGRect)targetRect animated:(BOOL)a } else { [self.overlayView addSubview:self]; - self.visible = YES; - // Delegate if (self.delegate && [self.delegate respondsToSelector:@selector(popupMenuDidAppear:)]) { [self.delegate popupMenuDidAppear:self];