Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/Core/src/Platform/iOS/WindowViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void UpdateContentWrapperContentFrame()
_contentWrapperView.Subviews[0].Frame = frame;
}
}

/// <summary>
/// Sets up the TitleBar in the ViewController.
/// </summary>
Expand All @@ -108,8 +108,9 @@ public void SetUpTitleBar(IWindow window, IMauiContext mauiContext)
return;
}

var newTitleBar = window.TitleBar?.ToPlatform(mauiContext);
HasCustomTitleBar = newTitleBar is not null;
var newTitleBar = window.TitleBar;
var newPlatTitleBar = newTitleBar?.ToPlatform(mauiContext);
HasCustomTitleBar = newPlatTitleBar is not null;

IView? iTitleBar = null;
_iTitleBarRef?.TryGetTarget(out iTitleBar);
Expand All @@ -120,13 +121,13 @@ public void SetUpTitleBar(IWindow window, IMauiContext mauiContext)
iTitleBar?.DisconnectHandlers();
iTitleBar = null;

if (newTitleBar is not null)
if (newPlatTitleBar is not null)
{
iTitleBar = window.TitleBar;
View.AddSubview(newTitleBar);
iTitleBar = newTitleBar;
View.AddSubview(newPlatTitleBar);
}

_titleBar = newTitleBar;
_titleBar = newPlatTitleBar;
_iTitleBarRef = new WeakReference<IView?>(iTitleBar);
}

Expand Down
Loading