diff --git a/Pod/Classes/EPExtensions.swift b/Pod/Classes/EPExtensions.swift index 17a3610..6b04fb8 100644 --- a/Pod/Classes/EPExtensions.swift +++ b/Pod/Classes/EPExtensions.swift @@ -17,10 +17,10 @@ extension UIViewController { } func showAlert(_ message: String, andTitle title: String) { - let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) + let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert) // add an action (button) - alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) + alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil)) // show the alert self.present(alert, animated: true, completion: nil) diff --git a/Pod/Classes/EPSignatureViewController.swift b/Pod/Classes/EPSignatureViewController.swift index 249d3b8..6ff07fb 100644 --- a/Pod/Classes/EPSignatureViewController.swift +++ b/Pod/Classes/EPSignatureViewController.swift @@ -39,13 +39,13 @@ open class EPSignatureViewController: UIViewController { override open func viewDidLoad() { super.viewDidLoad() - let cancelButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) + let cancelButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) cancelButton.tintColor = tintColor self.navigationItem.leftBarButtonItem = cancelButton - let doneButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) + let doneButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) doneButton.tintColor = tintColor - let clearButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) + let clearButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) clearButton.tintColor = tintColor if showsDate { @@ -58,7 +58,7 @@ open class EPSignatureViewController: UIViewController { } if showsSaveSignatureOption { - let actionButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) + let actionButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) actionButton.tintColor = tintColor self.navigationItem.rightBarButtonItems = [doneButton, clearButton, actionButton] switchSaveSignature.onTintColor = tintColor @@ -121,20 +121,20 @@ open class EPSignatureViewController: UIViewController { } @objc func onTouchActionButton(_ barButton: UIBarButtonItem) { - let action = UIAlertController(title: "Action", message: "", preferredStyle: UIAlertControllerStyle.actionSheet) + let action = UIAlertController(title: "Action", message: "", preferredStyle: UIAlertController.Style.actionSheet) action.view.tintColor = tintColor - action.addAction(UIAlertAction(title: "Load default signature", style: UIAlertActionStyle.default, handler: { action in + action.addAction(UIAlertAction(title: "Load default signature", style: UIAlertAction.Style.default, handler: { action in let docPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first let filePath = (docPath! as NSString).appendingPathComponent("sig.data") self.signatureView.loadSignature(filePath) })) - action.addAction(UIAlertAction(title: "Delete default signature", style: UIAlertActionStyle.destructive, handler: { action in + action.addAction(UIAlertAction(title: "Delete default signature", style: UIAlertAction.Style.destructive, handler: { action in self.signatureView.removeSignature() })) - action.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil)) + action.addAction(UIAlertAction(title: "Cancel", style: UIAlertAction.Style.cancel, handler: nil)) if let popOver = action.popoverPresentationController { popOver.barButtonItem = barButton