Skip to content

Commit 2dd1877

Browse files
update fix issue #15
1 parent 913b950 commit 2dd1877

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

WYPopoverController/WYPopoverController.m

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ - (void)presentPopoverFromRect:(CGRect)aRect inView:(UIView *)aView permittedArr
13181318

13191319
if ([viewController isKindOfClass:[UINavigationController class]] == NO)
13201320
{
1321-
[viewController viewDidAppear:YES];
1321+
[viewController viewDidAppear:NO];
13221322
}
13231323
}
13241324

@@ -1644,13 +1644,13 @@ - (void)dismissPopoverAnimated:(BOOL)aAnimated callDelegate:(BOOL)callDelegate
16441644
object:nil];
16451645
}
16461646

1647+
if ([viewController isKindOfClass:[UINavigationController class]] == NO)
1648+
{
1649+
[viewController viewWillDisappear:aAnimated];
1650+
}
1651+
16471652
if (aAnimated)
16481653
{
1649-
if ([viewController isKindOfClass:[UINavigationController class]] == NO)
1650-
{
1651-
[viewController viewWillDisappear:aAnimated];
1652-
}
1653-
16541654
[UIView animateWithDuration:WYPOPOVER_DEFAULT_ANIMATION_DURATION animations:^{
16551655
containerView.alpha = 0;
16561656
} completion:^(BOOL finished) {
@@ -1659,10 +1659,6 @@ - (void)dismissPopoverAnimated:(BOOL)aAnimated callDelegate:(BOOL)callDelegate
16591659
}
16601660
else
16611661
{
1662-
if ([viewController isKindOfClass:[UINavigationController class]] == NO)
1663-
{
1664-
[viewController viewWillDisappear:NO];
1665-
}
16661662
completionBlock(YES);
16671663
}
16681664
}

0 commit comments

Comments
 (0)