WebViewController

open class WebViewController : NibViewController, WKNavigationDelegate

A NibViewController subclass that displays web content.

This view controller holds a WKWebView and a UIProgressView. The progress view is only shown when the web view is loading content. This view controller also conforms to WKNavigationDelegate.

  • The web view.

    Declaration

    Swift

    @IBOutlet
    public var webView: WKWebView!
  • url

    The URL to load.

    Declaration

    Swift

    open var url: URL?
  • The web view configuration.

    Declaration

    Swift

    open var webViewConfiguration: WKWebViewConfiguration
  • The observer for the estimated progress of loading the web page.

    Declaration

    Swift

    open var estimatedProgressObserver: NSKeyValueObservation?
  • Declaration

    Swift

    override open func setup()
  • Sets up observing the estimated progress of loading a url in the web view.

    The progress view is hidden if the estimated progress is completed or has a value of 1.0.

    Declaration

    Swift

    open func setupEstimatedProgressObserver()
  • Shows the progress view with an animation.

    The progress view is shown in a ease-in ease-out curve.

    Declaration

    Swift

    open func showProgressView()
  • Hides the progress view with an animation.

    The progress view is hidden in a ease-in ease-out curve.

    Declaration

    Swift

    open func hideProgressView()

WKNavigationDelegate Methods