Update to Swift 6 iOS 18 and .sheet
is now presented as small compared to previous versions on the iPad. I attempted to fix with the modifier .presentationDetents([.large], selection: $selectedDetent)
to set the sheet size .large
, but it didn’t work. I’m wondering if there’s an easy way to have the sheets display how they use to.
Notice the left is Swift 6 on iOS 17, while the right screenshot is Swift6 on iOS 18.
2
Answers
Discovered I can just set a
.frame
within the.sheet
and manually set the size to 85% of the screen size produces similar results as the old sheet.Use
presentationSizing
to set the size of the sheet. Sheets before iOS 18 seem to be.page
by default, so you can use that.You can also declare your own sizings: