How to customize the NavigationBar in SwiftUI?

I dont want to use UIKit to customize the navigationBar,I want to customize the navigationBar with swiftUI.... but I dont know how to do ....Just like changing navigationBar 's barTintColor...or customize the titleView....
Answered by BabyJ in 647160022
You can’t do that yet in SwiftUI. Hopefully it should come soon.
The closest you can get is
Code Block Swift
.onAppear {
UINavigationBar.appearance().barTintColor = .systemRed
}

Accepted Answer
You can’t do that yet in SwiftUI. Hopefully it should come soon.
The closest you can get is
Code Block Swift
.onAppear {
UINavigationBar.appearance().barTintColor = .systemRed
}

How to customize the NavigationBar in SwiftUI?
 
 
Q