AboutViewController

class AboutViewController : UIViewController
extension AboutViewController: WKNavigationDelegate

Controller to display the About page.

Internally it is a WKWebView that displays the resource file about.html.

  • Embedded web browser

    Declaration

    Swift

    var webView: WKWebView?
  • Initializer. Only calls super

    Declaration

    Swift

    required init?(coder aDecoder: NSCoder)
  • Initializer. Only calls super

    Declaration

    Swift

    override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)
  • Configures the view. Performs the following actions:

    1. Sets the title to About
    2. Adds “Done” button
    3. Adds the webview that loads about.html from the bundle.

    Declaration

    Swift

    override func viewDidLoad()
  • Closes this view controller. Triggered by pressing the “Done” button in navigation bar.

    Declaration

    Swift

    @objc
    func closeViewController()
  • Opens Safari when user clicks a link in the About page.

    Declaration

    Swift

    func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction,
                 decisionHandler: @escaping (WKNavigationActionPolicy) -> Void)