WebViewController
open class WebViewController : UIViewController
extension WebViewController: WKNavigationDelegate
A siple web view controller with WKWebView and navigation buttons in the navigation bar.
-
An activity indicator.
Declaration
Swift
public private(set) lazy var activityIndicatorView: UIActivityIndicatorView { get set } -
A web view.
Declaration
Swift
public private(set) lazy var webView: WKWebView { get set } -
An URL to load in the web view.
Declaration
Swift
public var url: URL? -
Undocumented
Declaration
Swift
open override func viewDidLoad() -
Makes a request with a given
URLto load the web view.Declaration
Swift
public func open(_ url: URL) -
Makes a request with a given
URLRequestto load the web view.Declaration
Swift
public func open(_ request: URLRequest) -
Dismisses the view controller.
Declaration
Swift
@IBAction public func close(_ sender: Any)
-
Setup and layout the web view.
Declaration
Swift
open func setupWebView() -
Undocumented
Declaration
Swift
public func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) -
Undocumented
Declaration
Swift
public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) -
Goes back in the web view navigation.
Declaration
Swift
@objc func goBack() -
Goes forward in the web view navigation.
Declaration
Swift
@objc func goForward()
View on GitHub
WebViewController Class Reference