A simple Swift package to add Toast Notifications to your app. Install with the Swift Package Manager.
This package uses SwiftUI and requires a target of iOS 15.0. This means that the package isn't macOS compatible yet. It's planned for a future release.
Use the toast view by adding the view which presents the toast, see example below:
import SwiftUI
import CoffeeToast
struct ContentView: View {
@State private var toastIsShown = false
var body: some View {
Toast("TOAST NOTIFICATION", isShown: $toastIsShown) {
Button("Toggle Toast") {
toastIsShown = true
}
}
}
}
link |
Stars: 2 |
Last commit: 2 years ago |
This release changes how to use the package.
Full Changelog: https://github.com/maeganwilson/CoffeeToast/compare/1.0.1...2.0.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics