Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Bug fix : Overlay view could stay on top, freezing the whole UI #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions QBPopupMenu/QBPopupMenu.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:)]) {
Expand All @@ -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];
Expand Down