我想为全屏更改背景颜色。我正在使用NavigationView
,我希望将灰色设为背景颜色(而不是默认的白色)
struct ContentView : View {
var body: some View {
NavigationView {
ScrollView {
Text("Example")
}
.navigationBarTitle("titl")
}
}
}
.background(Color.red)
在任何地方均不起作用。