How do I make the sheet occupy the full screen width and bottom when I customize the height of the sheet using presentationDetents?
about presentationDetents modifier
@State private var showSheet = false
var body: some View {
Button("show Sheet") {
showSheet.toggle()
}
Spacer()
.sheet(isPresented: $showSheet) {
VStack {
Text("this is Sheet")
.font(.title)
Button("close") {
showSheet = false
}
}
.presentationBackground(Color.white.opacity(0.8))
.presentationDetents([.medium])
}
}
}
(sheet is full screen width on ios 18.6)
(sheet is not full screen width)