Add confirmation prompt for removing keys (fix #491)

This commit is contained in:
Mingshen Sun 2021-12-29 16:19:12 -08:00
parent 7320319031
commit ff6a1edf62
7 changed files with 42 additions and 9 deletions

View file

@ -28,6 +28,10 @@ public extension UIAlertAction {
UIAlertAction(title: "Ok".localize(), style: .default, handler: handler)
}
static func remove(handler: ((UIAlertAction) -> Void)? = nil) -> UIAlertAction {
UIAlertAction(title: "Remove".localize(), style: .destructive, handler: handler)
}
static func okAndPopView(controller: UIViewController) -> UIAlertAction {
ok { _ in
controller.navigationController?.popViewController(animated: true)