// // ViewControllerExtensions.swift // CapFinder // // Created by User on 18.03.18. // Copyright © 2018 User. All rights reserved. // import Foundation import UIKit extension UIViewController { // MARK: Alerts /// Present an alert with a message to the user func showAlert(_ message: String, title: String = "Error") { let alertController = UIAlertController( title: title, message: message, preferredStyle: .alert, blurStyle: .dark) alertController.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil)) self.present(alertController, animated: true, completion: nil) } }