зеркало из https://github.com/DeGsoft/maui-linux.git
[iOS] Fix child view position when the Navigation Bar is translucent (#659)
This commit is contained in:
Родитель
1616413215
Коммит
f81e41b11b
|
@ -154,7 +154,7 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
|
||||
var toolbar = _secondaryToolbar;
|
||||
// Use 0 if the NavBar is hidden or will be hidden
|
||||
var toolbarY = NavigationBarHidden || !NavigationPage.GetHasNavigationBar(Current) ? 0 : navBarFrame.Bottom;
|
||||
var toolbarY = NavigationBarHidden || NavigationBar.Translucent || !NavigationPage.GetHasNavigationBar(Current) ? 0 : navBarFrame.Bottom;
|
||||
toolbar.Frame = new RectangleF(0, toolbarY, View.Frame.Width, toolbar.Frame.Height);
|
||||
|
||||
double trueBottom = toolbar.Hidden ? toolbarY : toolbar.Frame.Bottom;
|
||||
|
@ -824,7 +824,13 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
public override void ViewWillAppear(bool animated)
|
||||
{
|
||||
UpdateNavigationBarVisibility(animated);
|
||||
EdgesForExtendedLayout = UIRectEdge.None;
|
||||
|
||||
NavigationRenderer n;
|
||||
var isTranslucent = false;
|
||||
if (_navigation.TryGetTarget(out n))
|
||||
isTranslucent = n.NavigationBar.Translucent;
|
||||
EdgesForExtendedLayout = isTranslucent ? UIRectEdge.All : UIRectEdge.None;
|
||||
|
||||
base.ViewWillAppear(animated);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче