How to change the color of Navigation "Back Button" (it's created automatically) to black,
and the color of DisclosureGroup "Chevron" to another color?
I've tried to do .buttonStyle(PlainButtonStyle())
and .foregroundColor(.black)
struct ContentView: View {
var body: some View {
NavigationView {
NavigationLink(destination: DetailView()) {
Text("Go to details ->")
.foregroundColor(.purple)
.underline()
}
}
}
}
struct DetailView: View {
@State private var isExpanded = false
var body: some View {
VStack {
DisclosureGroup("All Details", isExpanded: $isExpanded) {
}.buttonStyle(PlainButtonStyle())
.foregroundColor(.black)
Spacer()
}
.padding()
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…