refactor: creating alerts

This commit is contained in:
Alexander Rutsman 2021-11-15 18:50:28 +03:00
parent 632ebdff4d
commit a4845bf0a1
1 changed files with 2 additions and 5 deletions

View File

@ -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