I need a title to be on the left side of a navigation bar. I use the following code:
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Text("Title")
.foregroundColor(.black)
}
}
The problem is that it is displayed blue and as a button. Is it possible to change its color to black somehow? foregroundColor
, accentColor
do not work. Also, I tried to use a disabled button with Text("Title")
inside. But it was displayed grey in that case. Not color, nor PlainButtonStyle
were applied.