application iOS de notes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
notes/Notes/UIViewController+Extensions...

20 lines
617 B

//
// UIViewController+Extensions.swift
// Notes
//
// Created by Laurent Morvillier on 19/09/2022.
//
import Foundation
import UIKit
extension UIViewController {
@objc public func showAlert(message: String, title: String?, completion: (() -> ())? = nil) {
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
let action = UIAlertAction(title: NSLocalizedString("OK", comment: "OK"), style: .default, handler: nil)
alertController.addAction(action)
self.present(alertController, animated: true, completion: completion)
}
}