BastiaanJansen / toast-swift

Customizable Swift Toast view built with UIKit. 🍞
MIT License
466 stars 77 forks source link

feat: add option to close overlapped toasts #51

Closed jisu15-kim closed 6 months ago

jisu15-kim commented 6 months ago

Hello ! @BastiaanJansen When multiple toast messages appear, the existing messages remain visible. I suggest an option that naturally dismisses the existing messages when new toast messages overlap.

here is an example

let config = ToastConfiguration(allowToastOverlap: false)
let toast = Toast.default(
       image: UIImage(systemName: "airpodspro")!,
       title: "Airpods Pro",
       subtitle: "Connected",
       config: config
)
toast.show()