I am currently experiencing the problem that the readability of my navigationTitle("Gratitude Journal")
is bad. Can someone help me figure out how to change it?
.foregroundColor
does not work.
Thanks!
I am currently experiencing the problem that the readability of my navigationTitle("Gratitude Journal")
is bad. Can someone help me figure out how to change it?
.foregroundColor
does not work.
Thanks!
Inside the initializer of the View
, you can provide the color using UIKit commands.
Here's how it works:
struct MyView: View {
init() {
UINavigationBar.appearance().largeTitleTextAttributes = [.foregroundColor: UIColor(Color.blue)] // Change blue with your desired color
UINavigationBar.appearance().titleTextAttributes = [.foregroundColor: UIColor(Color.blue)] // Change blue with your desired color
}
var body: some View {
// Whatever
}
}