Elektrine lite

← Feed

@danielsaidi@mastodon.social

Post #2883423

2026-05-15 07:05 UTC

@appfrosch@iosdev.space @alpennec@iosdev.space I think using interactive dismissal makes the most sense, but I too would love to have a way to detect when the user tries to dismiss the sheet. I have no such support in that package, and don't know of any SwiftUI native ways of doing so.

Replies (1)

  • @appfrosch@iosdev.space 2026-05-15 07:10

    @danielsaidi@mastodon.social @alpennec@iosdev.space have a look at https://livsycode.com/swiftui/intercepting-swiftui-sheet-dismissal/. While it's more like a workaround to achieving the goal, it's still native. It cleverly uses the indents to react on the indent height being under a certain threshold. Could be an interesting addition to your package perhaps. (Being do close to WWDC, it also might make sense to wait and see what Apple has done for the SwiftUI universe first …)

    Open ##2883425