adamfootdev / BottomSheet

Access UISheetPresentationController in SwiftUI on iOS 15 using a simple .bottomSheet modifier.
MIT License
346 stars 40 forks source link

Added onDismiss callback #4

Closed lvandal closed 3 years ago

lvandal commented 3 years ago

The onDismiss() callback can be useful when actions need to be done when the sheet is being dismissed.

Rspoon3 commented 3 years ago

Can’t you just use the SwiftUI binding for this? Since bottom sheet requires a binding to a boolean or item you should just be able to monitor that with an onChange modifier.