0

I am trying to change the gray colour in the background to red however it is not working. I've tried attaching the .background() modifier to the List and to the NavigationView however cannot get the desired result.

Here is the code:

var body: some View {
        
        NavigationView {
                VStack {
                    List {
                  
                        
                        Section(header: Text("Account Settings")) {
                            NavigationLink(
                                destination: CreditsView(),
                                label: {
                                    Text("Notifications")
                                })
                            
                            NavigationLink(
                                destination: CreditsView(),
                                label: {
                                    Text("Help")
                                })
                            
                            NavigationLink(
                                destination: RateAppView(),
                                label: {
                                    Text("Rate This App")
                                })
                            
                        }
                        .headerProminence(.increased)

                        Section(header: Text("Information")) {
                            
                            NavigationLink(
                                destination: TermsAndConditionsView(),
                                label: {
                                    Text("Terms and Conditions")
                                })
                            
                            NavigationLink(
                                destination: PrivacyPolicyView(),
                                label: {
                                    Text("Privacy Policy")
                                })
                            
                            NavigationLink(
                                destination: DeleteAccountView(),
                                label: {
                                    Text("Delete Account")
                                })
                        }
                        .headerProminence(.increased)
                    }
                    .background(.red)
                    .listStyle(.insetGrouped)
                }
    }
        .navigationTitle("Settings")
    }

And here is what it looks like: enter image description here

I want the off-white / grey to be red. How can I achieve this?

mbby
  • 397
  • 1
  • 11

0 Answers0