I'm running iOS 13 simulator with a SwiftUI sheet modal - trying to paint the sheet background and ignore safe areas - but there's still white sheet showing. Any ideas on how to do this properly?
    var body: some View {
        VStack(alignment: .center, spacing: 0) {
... redacted ...
 }   // VStack
            .background(Color.gray.edgesIgnoringSafeArea(.all))
iPhone Simulator with sheet modal
See the image (attached)
Any ideas what I'm doing wrong?
Expand top container (VStack in your case) to full sheet area, like
VStack {
    // ... your content
}
.frame(maxWidth: .infinity, maxHeight: .infinity)      // << here !!
.background(Color.gray.edgesIgnoringSafeArea(.all))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With