static func showErrorAlert(error: Error, from sourceVC: UIViewController?, onDismissal: (() -> Void)? = nil) {
guard let sourceVC = sourceVC else { return }
guard let (title, message) = ErrorPresenter.errorMessage(for: error) else { return }
- let okAction = UIAlertAction(title: "Ok", style: .default) { (_) in
+ let okAction = UIAlertAction(title: "OK", style: .default) { (_) in
onDismissal?()
}
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
static func showErrorAlert(title: String, message: String, from sourceVC: UIViewController?, onDismissal: (() -> Void)? = nil) {
guard let sourceVC = sourceVC else { return }
- let okAction = UIAlertAction(title: "Ok", style: .default) { (_) in
+ let okAction = UIAlertAction(title: "OK", style: .default) { (_) in
onDismissal?()
}
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
}
func showErrorAlert(title: String, message: String) {
- let okAction = UIAlertAction(title: "Ok", style: .default)
+ let okAction = UIAlertAction(title: "OK", style: .default)
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addAction(okAction)
}
func showErrorAlert(title: String, message: String) {
- let okAction = UIAlertAction(title: "Ok", style: .default)
+ let okAction = UIAlertAction(title: "OK", style: .default)
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addAction(okAction)
}
func showErrorAlert(title: String, message: String) {
- let okAction = UIAlertAction(title: "Ok", style: .default)
+ let okAction = UIAlertAction(title: "OK", style: .default)
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addAction(okAction)
}
func showErrorAlert(title: String, message: String) {
- let okAction = UIAlertAction(title: "Ok", style: .default)
+ let okAction = UIAlertAction(title: "OK", style: .default)
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addAction(okAction)