I'm currently creating the sidebar for my app and now I am facing the problem of how I can change the background Color of my navigation view without affecting the background of the other views.
I've tried it like this:
init(){
UITableView.appearance().backgroundColor = UIColor.secondarySystemBackground
}
That works but now all of my list backgrounds have this color, which a don't want.
And if I try it like this, it doesn't change at all:
ZStack{
Color.red
List{
VStack{
NavigationLink(destination: ColorMenu()){
Label("Colors", systemImage: "square.grid.2x2.fill").accentColor(Color("Colory"))
}
}
}
}
So my question is if there is a way to change the background Color without affecting all the other views?
Thanks in advance
4
0
3.9k