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

Title Icon Subtitle
title icon subtitle


Add this lib to your project using SPM.

import NotificationToast

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

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

let toast = ToastView(
    title: "Airpods Pro",
    titleFont: .systemFont(ofSize: 13, weight: .regular),
    subtitle: "Connected",
    subtitleFont: .systemFont(ofSize: 11, weight: .light),
    icon: UIImage(systemName: "airpodspro"),
    iconSpacing: 16,
    onTap: { print("Tapped!") }

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