mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-29 03:21:02 +00:00
20 lines
537 B
Swift
20 lines
537 B
Swift
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||
|
|
||
|
import UIKit
|
||
|
import ViewModels
|
||
|
|
||
|
extension UIViewController {
|
||
|
func present(alertItem: AlertItem) {
|
||
|
let alertController = UIAlertController(
|
||
|
title: nil,
|
||
|
message: alertItem.error.localizedDescription,
|
||
|
preferredStyle: .alert)
|
||
|
|
||
|
let okAction = UIAlertAction(title: NSLocalizedString("ok", comment: ""), style: .default) { _ in }
|
||
|
|
||
|
alertController.addAction(okAction)
|
||
|
|
||
|
present(alertController, animated: true)
|
||
|
}
|
||
|
}
|