How to change navigation bar color — SwiftUI Tips

Ale Patrón
1 min readMar 23, 2024

With iOS 16, Apple released new toolbar APIs, which includes new features for navigation bars. To change the background color of a navigation bar, we can simply use the toolbarBackground modifier.

For example, we can create a simple list that shows a colored navigation bar like so:

--

--