Skip to content

Commit c449763

Browse files
fix issue #72
1 parent 7e5ac19 commit c449763

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

WYPopoverController/WYPopoverController.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,8 +2089,6 @@ - (void)dismissPopoverAnimated:(BOOL)aAnimated options:(WYPopoverAnimationOption
20892089

20902090
- (void)dismissPopoverAnimated:(BOOL)aAnimated callDelegate:(BOOL)callDelegate options:(WYPopoverAnimationOptions)aOptions
20912091
{
2092-
if (overlayView == nil) return;
2093-
20942092
void (^completionBlock)(BOOL);
20952093

20962094
CGFloat duration = self.animationDuration;
@@ -2610,11 +2608,14 @@ - (void)dealloc
26102608
{
26112609
[[NSNotificationCenter defaultCenter] removeObserver:self];
26122610

2611+
[containerView removeFromSuperview];
2612+
[overlayView removeFromSuperview];
2613+
[overlayView setDelegate:nil];
2614+
26132615
barButtonItem = nil;
26142616
passthroughViews = nil;
26152617
viewController = nil;
26162618
inView = nil;
2617-
[overlayView setDelegate:nil];
26182619
overlayView = nil;
26192620
containerView = nil;
26202621
}

0 commit comments

Comments
 (0)