From 3d12c7da929318ea78f1e584f8ba6d7b0c516526 Mon Sep 17 00:00:00 2001 From: Bastiaan Jansen <21118262+BastiaanJansen@users.noreply.github.com> Date: Sat, 16 Sep 2023 12:29:33 +0200 Subject: [PATCH] updated readme with queue information --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index dbb71c4..a43c60e 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,19 @@ let toast = Toast.custom(view: customToastView) toast.show() ``` +### Queues +To show toasts after each other, use the `ToastQueue` class: + +```swift +let toast1 = Toast.text("Notification 1") +let toast2 = Toast.text("Notification 2") +let toast3 = Toast.text("Notification 3") + +let queue = ToastQueue(toasts: [toast1, toast2, toast3]) + +queue.show() +``` + ### Delegates Below delegate functions are optional to implement when implementing `ToastDelegate`.