WebViewController
open class WebViewController: UIViewController
An instance of WebViewController displays interactive web content.
-
Returns the web view for the controller.
Declaration
Swift
public final var webView: WKWebView -
Returns the progress view for the controller.
Declaration
Swift
public final var progressBar: UIProgressView -
The URL request for the web view. Upon setting this property, the web view immediately begins loading the request.
Declaration
Swift
public final var urlRequest: URLRequest -
Specifies whether or not to display the web view title as the navigation bar title. The default is
false, which sets the navigation bar title to the URL host name of the URL request.Declaration
Swift
public final var displaysWebViewTitle: Bool = false
-
Constructs a new
WebViewController.Declaration
Swift
public init(urlRequest: URLRequest, configuration: WKWebViewConfiguration = WKWebViewConfiguration(), activities: [UIActivity]? = nil)Parameters
urlRequestThe URL request for the web view to load.
configurationThe configuration for the web view.
activitiesThe custom activities to display in the
UIActivityViewControllerthat is presented when the action button is tapped.Return Value
A new
WebViewControllerinstance. -
Constructs a new
WebViewController.Declaration
Swift
public convenience init(url: URL)Parameters
urlThe URL to display in the web view.
Return Value
A new
WebViewControllerinstance.
View on GitHub
WebViewController Class Reference