[+] Dismiss alert after receiving the response

This commit is contained in:
Hykilpikonna
2021-01-22 15:37:13 -05:00
parent f37a12c963
commit 306d4bfaf1
2 changed files with 11 additions and 6 deletions
+5 -1
View File
@@ -134,8 +134,12 @@ extension UIViewController
return alert
}
/// A message is an okayable alert
@discardableResult
func msg(_ title: String, _ message: String) -> UIAlertController { alert(title, message, okayable: true) }
/// More convenient dismiss function
func dismiss() { dismiss(animated: false, completion: nil) }
func dismiss(_ completion: (() -> Void)? = nil) { dismiss(animated: false, completion: completion) }
}