Swiftpack.co - heyjaywilson/CoffeeToast as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by heyjaywilson.
heyjaywilson/CoffeeToast v1.0.0
A swift package to easily add Toast notifications to your app
⭐️ 2
🕓 2 years ago
iOS
.package(url: "https://github.com/heyjaywilson/CoffeeToast.git", from: "v1.0.0")

CoffeeToast

GitHub release (latest SemVer including pre-releases) Open Issues Swift

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.

How to Use

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
            }   
        }
    }
}

v1 Configuration options

  • Background Color
  • Text
  • Duration
  • Foreground Color (AKA Text Color)
  • Content view

GitHub

link
Stars: 2
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

v2.0.0
2 years ago

This release changes how to use the package.

What's Changed

New Contributors

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