File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1613,6 +1613,7 @@ - (void)presentPopoverFromRect:(CGRect)aRect
16131613 {
16141614 if ((options & WYPopoverAnimationOptionFade) == WYPopoverAnimationOptionFade)
16151615 {
1616+ overlayView.alpha = 0 ;
16161617 containerView.alpha = 0 ;
16171618 }
16181619
@@ -1626,6 +1627,8 @@ - (void)presentPopoverFromRect:(CGRect)aRect
16261627 }
16271628
16281629 [UIView animateWithDuration: WY_POPOVER_DEFAULT_ANIMATION_DURATION animations: ^{
1630+ overlayView.alpha = 1 ;
1631+ overlayView.transform = CGAffineTransformIdentity;
16291632 containerView.alpha = 1 ;
16301633 containerView.transform = CGAffineTransformIdentity;
16311634 } completion: ^(BOOL finished) {
@@ -2027,8 +2030,20 @@ - (void)dismissPopoverAnimated:(BOOL)aAnimated callDelegate:(BOOL)callDelegate
20272030
20282031 completionBlock = ^(BOOL finished) {
20292032
2030- [overlayView removeFromSuperview ];
2031- overlayView = nil ;
2033+ if (aAnimated)
2034+ {
2035+ [UIView animateWithDuration: WY_POPOVER_DEFAULT_ANIMATION_DURATION animations: ^{
2036+ overlayView.alpha = 0 ;
2037+ } completion: ^(BOOL finished) {
2038+ [overlayView removeFromSuperview ];
2039+ overlayView = nil ;
2040+ }];
2041+ }
2042+ else
2043+ {
2044+ [overlayView removeFromSuperview ];
2045+ overlayView = nil ;
2046+ }
20322047
20332048 if ([viewController isKindOfClass: [UINavigationController class ]] == NO )
20342049 {
You can’t perform that action at this time.
0 commit comments