I don't want black background in presented sheet

I want a different color, one from my asset catalog, as the background of my first ever swift UI view (and, well, swift, the rest of the app is still obj.c)

I've tried putting the color everywhere, but it does't take. I tried with just .red, too to make sure it wasn't me. Does anyone know where I can put a color call that will actually run? Black looks very out of place in my happy app. I spent a lot of time making a custom dark palette. TIA KT

    @State private var viewModel = ViewModel()
    @State private var showAddSheet = false
    
    var body: some View {
        ZStack {
            Color.myCuteBg
                .ignoresSafeArea(.all)
            
            NavigationStack {
                content
                    .navigationBarTitleDisplayMode(.inline)
                    .toolbar {
                        ToolbarItem(placement: .principal) {
                            Image("cute.image")
                                .font(.system(size: 30))
                                .foregroundColor(.beigeTitle)
                        }
                    }
            }
            .background(Color.myCuteBg)
            .presentationBackground(.myCuteBg)
            .sheet(isPresented: $showAddSheet) {
                AddView()
            }
            .environment(viewModel)
            .onAppear {
                viewModel.fetchStuff()
            }
        }
        .tint(.cuteColor)
    }
    
    @ViewBuilder var content: some View {
        if viewModel.list.isEmpty && viewModel.anotherlist.isEmpty {
            ContentUnavailableView(
                "No Content",
                image: "stop",
                description: Text("Add something here by tapping the + button.")
            )
        } else {
            contentList
        }
    }
    
     var contentList: some View {
        blah blah blah
    }
}

First I tried the background, then the presentation background, and finally the Zstack. I hope this is fixed because it's actually fun to build scrollable content and text with swiftUI and I'd been avoiding it for years.

.sheet(isPresented: $showAddSheet) {
  AddView()
    .presentationBackground(yourColor)
}

Oh thanks for the reply. I meant that the content view is. being presented as a sheet itself. I tried the code above, and the child also has a black glass sheet.

So, maybe pretend I don't present anything.

Adding a background to your view covers how to add a background behind your view.

Apply the learnings from the article in a small test project to test and verify. If you're still getting the same black screen, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

I don't want black background in presented sheet
 
 
Q