I am presenting a sheet in my project but I would like to change the opacity/color of the background behind the view presented.
Here's my code :
@State var presentElement: Bool = false
var body: some View {
Text("Present el")
.onTapGesture {
presentElement = true
}
.sheet(isPresented: $presentElement) {
NotifActionModal()
.background() {
GeometryReader { geometry in
Path { path in
frameSize = geometry.size.height
}
}
}
.presentationDetents([.height(frameSize)])
}
}