NotificationToast

1.0.5

Google toast the Apple way !
PhilippeWeidmann/NotificationToast

What's New

Add haptic feedback

2021-05-02T19:01:45Z

NotificationToast

A view that tries to replicate iOS default toast message view.

Title Icon Subtitle
Title Icon Subtitle

Usage

Add this lib to your project using SPM.

import NotificationToast

let toast = ToastView(title: "Safari pasted from Notes")
toast.show()

The view also includes optional subtitle, leading icon view, and on tap callback :

let toast = ToastView(
    title: "Airpods Pro",
    subtitle: "Connected",
    icon: UIImage(systemName: "airpodspro"),
    onTap: { print("Tapped!") }
)
toast.show()

You can present the view with a haptic feedback at the same time (nil by default) :

toast.show(haptic: .success)

Contribute

As this is my first 'UI' package I'm sure it can be greatly improved, PR are welcome 😊

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Apr 03 2024 23:25:02 GMT-0900 (Hawaii-Aleutian Daylight Time)