Skip to content

Initial Release

Choose a tag to compare

@michael94ellis michael94ellis released this 12 Jun 22:45
· 21 commits to main since this release

Support for SwiftUI Toasts using UIKit's UIWindow class.

Toasts presented with this library will be tappable, swipeable, animatable, and fully controllable using SwiftUI APIs. See the repo for examples!

All that this library does is create a UIWindow and place your content inside it, then it will clean up behind itself when your toast is dismissed.

Use the Environment Values to make it easy to use!

/// Display Toasts
@Environment(.toastManager) var toastManager

/// Dismiss A Specific Toast if you show multiple
@Environment(.dismissToast) var dismissToast: ((ToastID) -> Void)

/// Dismiss All Toasts
@Environment(.dismissAllToasts) var dismissToast: (() -> Void)

Please star the repo, leave feedback in the Issues section, or Fork and contribute! Thanks