From 7b48bf195d933c1d679cf89ad4bfa686d0621d48 Mon Sep 17 00:00:00 2001 From: Daniel Morales Date: Fri, 1 Nov 2024 13:09:18 -0700 Subject: [PATCH] Fix (#2102) --- .../Components/Navigation/NavigationBar.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift b/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift index 34af15a82..d086f2601 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift @@ -540,7 +540,13 @@ open class NavigationBar: UINavigationBar, TokenizedControl, TwoLineTitleViewDel tokenSet.update(newWindow.fluentTheme) updateTitleViewTokenSets() - updateColors(for: topItem) + + if let navigationItem = topItem { + let (_, actualItem) = actualStyleAndItem(for: navigationItem) + update(with: actualItem) + } else { + updateColors(for: topItem) + } } private func updateTitleViewTokenSets() { @@ -756,7 +762,7 @@ open class NavigationBar: UINavigationBar, TokenizedControl, TwoLineTitleViewDel } /// Updates the bar button items. - /// + /// /// In general, this should be called as late as possible when receiving a new navigation item /// because it will replace a client-provided left bar button item with a back button if needed. private func updateBarButtonItems(with navigationItem: UINavigationItem) {