-
Notifications
You must be signed in to change notification settings - Fork 1
WKWebViewController
A subclass of BaseWebViewController that wraps a WKWebView in a view controller.
The URL of the current page.
Declaration
Swift
public override var url: URL?
---
<br>
### titleOverride
The title to show in the navigation bar if something other than the loaded page’s title is required.
**Declaration**
> <sub>**Swift**</sub>
> ```swift
public override var titleOverride: String?
Returns true if the web view is currently loading, false if not.
Declaration
Swift
public override var loading: Bool
---
<br>
### stopLoading()
Stops the web view from being loaded any more.
**Declaration**
> <sub>**Swift**</sub>
> ```swift
public override func stopLoading()
Declaration
Swift
public override func viewDidLoad()
---
<br>
### deinit
**Declaration**
> <sub>**Swift**</sub>
> ```swift
deinit
## KVO Methods
Declaration
Swift
public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?)
---
<br>
## Action Methods <br>
### refreshButtonPressed(_:)
Refrshes the web view when the refresh button is pressed in the toolbar.
**Declaration**
> <sub>**Swift**</sub>
> ```swift
public override func refreshButtonPressed(_ sender: AnyObject?)
Parameters
| `sender` | The bar button item pressed. |
Requests the web view go back a page.
Declaration
Swift
public override func backButtonPressed(_ sender: AnyObject?)
**Parameters**
<table>
<tr><td> `sender` </td><td> The bar button item pressed. </td></tr>
<table>
---
<br>
### forwardButtonPressed(_:)
Requests the web view go forward a page.
**Declaration**
> <sub>**Swift**</sub>
> ```swift
public override func forwardButtonPressed(_ sender: AnyObject?)
Parameters
| `sender` | The bar button item pressed. |
## WKNavigationDelegate Methods
Declaration
Swift
@nonobjc public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: (WKNavigationActionPolicy) -> Void)
---
<br>
## Load Methods <br>
### loadBaseURL()
Creates a URL string, appending http:// if the URL string does not already have it as a prefix and then loads the page in the web view.
**Declaration**
> <sub>**Swift**</sub>
> ```swift
override func loadBaseURL() -> String
Return Value
The base URL string.