Add extension to openURL in safari

pull/2/head
Michael Scoff 7 years ago
parent 229813a1bd
commit 2485a1f297
  1. 6
      Trust/Extensions/UIViewController.swift
  2. 6
      Trust/Settings/ViewControllers/SettingsViewController.swift

@ -4,6 +4,7 @@ import Foundation
import UIKit
import Result
import MBProgressHUD
import SafariServices
enum ConfirmationError: LocalizedError {
case cancel
@ -47,4 +48,9 @@ extension UIViewController {
func hideLoading(animated: Bool = true) {
MBProgressHUD.hide(for: view, animated: animated)
}
func openURL(_ url: URL) {
let controller = SFSafariViewController(url: url)
present(controller, animated: true, completion: nil)
}
}

@ -2,7 +2,6 @@
import UIKit
import Eureka
import SafariServices
import VENTouchLock
import StoreKit
@ -204,9 +203,4 @@ class SettingsViewController: FormViewController {
func run(action: SettingsAction) {
delegate?.didAction(action: action, in: self)
}
func openURL(_ url: URL) {
let controller = SFSafariViewController(url: url)
present(controller, animated: true, completion: nil)
}
}

Loading…
Cancel
Save