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];