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
urlRequest
The URL request for the web view to load.
configuration
The configuration for the web view.
activities
The custom activities to display in the
UIActivityViewController
that is presented when the action button is tapped.Return Value
A new
WebViewController
instance. -
Constructs a new
WebViewController
.Declaration
Swift
public convenience init(url: URL)
Parameters
url
The URL to display in the web view.
Return Value
A new
WebViewController
instance.