refactor: creating alerts
This commit is contained in:
parent
632ebdff4d
commit
a4845bf0a1
|
|
@ -32,11 +32,8 @@ public enum AlertFactory {
|
|||
|
||||
controller.view.tintColor = descriptor.tintColor
|
||||
|
||||
for action in descriptor.actions {
|
||||
let alertAction = UIAlertAction(title: action.title, style: action.style) { _ in
|
||||
action.closure?()
|
||||
}
|
||||
controller.addAction(alertAction)
|
||||
descriptor.actions.forEach {
|
||||
controller.addAction($0)
|
||||
}
|
||||
|
||||
return controller
|
||||
|
|
|
|||
Loading…
Reference in New Issue