@@ -531,7 +531,7 @@ - (_LNPopupBarBackgroundView*)_ln_bottomBarExtension_nocreate
531
531
532
532
- (_LNPopupBarBackgroundView*)_ln_bottomBarExtension
533
533
{
534
- if (self.shouldExtendPopupBarUnderSafeArea == NO )
534
+ if (self.shouldExtendPopupBarUnderSafeArea == NO || self. _ln_popupController_nocreate . popupControllerInternalState == LNPopupPresentationStateBarHidden )
535
535
{
536
536
[self ._ln_bottomBarExtension_nocreate removeFromSuperview ];
537
537
@@ -542,6 +542,7 @@ - (_LNPopupBarBackgroundView*)_ln_bottomBarExtension
542
542
if (rv == nil )
543
543
{
544
544
rv = [[_LNPopupBarBackgroundView alloc ] initWithEffect: [UIBlurEffect effectWithStyle: UIBlurEffectStyleSystemChromeMaterial]];
545
+ rv.alpha = 0.0 ;
545
546
objc_setAssociatedObject (self, LNPopupBarExtensionView, rv, OBJC_ASSOCIATION_RETAIN_NONATOMIC );
546
547
[self ._ln_popupController _updateBarExtensionStyleFromPopupBar ];
547
548
}
@@ -581,21 +582,13 @@ - (void)_ln_popup_viewDidLayoutSubviews
581
582
UIView* extensionView = self._ln_bottomBarExtension_nocreate ;
582
583
dispatch_block_t removeFromSuperview = ^ {
583
584
[extensionView removeFromSuperview ];
584
- extensionView.alpha = 1 .0 ;
585
+ extensionView.alpha = 0 .0 ;
585
586
};
586
587
587
- if (self.shouldExtendPopupBarUnderSafeArea == NO )
588
+ if (self.shouldExtendPopupBarUnderSafeArea == NO || (self. _ln_popupController_nocreate . popupControllerInternalState == LNPopupPresentationStateBarHidden && extensionView. superview != nil ) )
588
589
{
589
590
removeFromSuperview ();
590
591
}
591
- else if (self._ln_popupController_nocreate .popupControllerInternalState == LNPopupPresentationStateBarHidden && extensionView.superview != nil )
592
- {
593
- [UIView animateWithDuration: 0.15 animations: ^{
594
- extensionView.alpha = 0.0 ;
595
- } completion: ^(BOOL finished) {
596
- removeFromSuperview ();
597
- }];
598
- }
599
592
}
600
593
601
594
- (BOOL )_ignoringLayoutDuringTransition
@@ -855,6 +848,7 @@ - (void)hBWT:(NSInteger)t iE:(BOOL)e
855
848
856
849
[self _layoutPopupBarOrderForTransition ];
857
850
851
+ self._ln_bottomBarExtension_nocreate .alpha = 1.0 ;
858
852
[self .selectedViewController.transitionCoordinator animateAlongsideTransition: ^ (id <UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
859
853
self._ln_bottomBarExtension_nocreate .frame = CGRectMake (0 , self.view .bounds .size .height - bottomSafeArea, self.view .bounds .size .width , self._ln_bottomBarExtension_nocreate .frame .size .height );
860
854
self._ln_popupController_nocreate .popupBar .bottomShadowView .alpha = 0.0 ;
@@ -923,6 +917,11 @@ - (void)sBWT:(NSInteger)t iE:(BOOL)e
923
917
[self _setIgnoringLayoutDuringTransition: NO ];
924
918
925
919
self._ln_popupController_nocreate .popupBar .effectGroupingIdentifier = effectGroupingIdentifier;
920
+
921
+ if (context.isCancelled == NO )
922
+ {
923
+ self._ln_bottomBarExtension_nocreate .alpha = 0.0 ;
924
+ }
926
925
}];
927
926
}
928
927
}
@@ -1114,6 +1113,7 @@ - (void)_sTH:(BOOL)hidden e:(UIRectEdge)edge d:(CGFloat)duration;
1114
1113
if (hidden == YES )
1115
1114
{
1116
1115
self._ln_bottomBarExtension .frame = frame;
1116
+ self._ln_bottomBarExtension_nocreate .alpha = 1.0 ;
1117
1117
}
1118
1118
1119
1119
self._ln_popupController_nocreate .popupBar .bottomShadowView .alpha = hidden == NO ? 0.0 : 1.0 ;
@@ -1129,7 +1129,7 @@ - (void)_sTH:(BOOL)hidden e:(UIRectEdge)edge d:(CGFloat)duration;
1129
1129
CGRect frame;
1130
1130
if (hidden)
1131
1131
{
1132
- self._ln_bottomBarExtension .frame = CGRectMake (0 , self.view .bounds .size .height - safeArea, self.view .bounds .size .width , self._ln_bottomBarExtension_nocreate .frame .size .height );
1132
+ self._ln_bottomBarExtension_nocreate .frame = CGRectMake (0 , self.view .bounds .size .height - safeArea, self.view .bounds .size .width , self._ln_bottomBarExtension_nocreate .frame .size .height );
1133
1133
1134
1134
self._ln_popupController_nocreate .popupBar .bottomShadowView .alpha = 0.0 ;
1135
1135
}
@@ -1141,7 +1141,7 @@ - (void)_sTH:(BOOL)hidden e:(UIRectEdge)edge d:(CGFloat)duration;
1141
1141
{
1142
1142
frame.origin .x = self.view .bounds .size .width ;
1143
1143
}
1144
- self._ln_bottomBarExtension .frame = frame;
1144
+ self._ln_bottomBarExtension_nocreate .frame = frame;
1145
1145
1146
1146
self._ln_popupController_nocreate .popupBar .bottomShadowView .alpha = 1.0 ;
1147
1147
}
@@ -1152,6 +1152,10 @@ - (void)_sTH:(BOOL)hidden e:(UIRectEdge)edge d:(CGFloat)duration;
1152
1152
{
1153
1153
self._ln_bottomBarExtension_nocreate .frame = CGRectMake (0 , self.view .bounds .size .height - safeArea, self.view .bounds .size .width , safeArea);
1154
1154
}
1155
+ else if (finished)
1156
+ {
1157
+ self._ln_bottomBarExtension_nocreate .alpha = 0.0 ;
1158
+ }
1155
1159
1156
1160
// Position the popup bar and content to the superview of the toolbar for the transition.
1157
1161
[self ._ln_popupController_nocreate _setContentToState: self ._ln_popupController_nocreate.popupControllerInternalState];
0 commit comments