Skip to content

Commit cb0ff93

Browse files
authored
Merge pull request #144 from NordicSemiconductor/bugfix/colors
Fixed setting NavBar colors for iOS 26+
2 parents 7668408 + ca8b765 commit cb0ff93

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Example/nRFBlinky/ViewControllers/BlinkyView/BlinkyViewController.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,11 @@ private extension BlinkyViewController {
259259
} else {
260260
color = UIColor.dynamicColor(light: .nordicRed, dark: .nordicRedDark)
261261
}
262-
navigationBar?.standardAppearance.titleTextAttributes = [.foregroundColor: color]
263-
navigationBar?.standardAppearance.largeTitleTextAttributes = [.foregroundColor: color]
262+
let navBarAppearance = UINavigationBarAppearance()
263+
navBarAppearance.titleTextAttributes = [.foregroundColor: color]
264+
navBarAppearance.largeTitleTextAttributes = [.foregroundColor: color]
265+
navigationBar?.standardAppearance = navBarAppearance
266+
navigationBar?.scrollEdgeAppearance = navBarAppearance
264267
} else {
265268
let color: UIColor
266269
if connected {

0 commit comments

Comments
 (0)