Instance Method

loadRequest(_:)

Connects to a given URL by initiating an asynchronous client request.

Declaration

func loadRequest(_ request: URLRequest)

Parameters

request

A URL request identifying the location of the content to load.

Discussion

Don’t use this method to load local HTML files; instead, use loadHTMLString(_:baseURL:). To stop this load, use the stopLoading() method. To see whether the receiver is done loading the content, use the isLoading property.

See Also

Loading Content

func load(Data, mimeType: String, textEncodingName: String, baseURL: URL)

Sets the main page contents, MIME type, content encoding, and base URL.

func loadHTMLString(String, baseURL: URL?)

Sets the main page content and base URL.

var request: URLRequest?

The URL request identifying the location of the content to load.

var isLoading: Bool

A Boolean value indicating whether the receiver is done loading content.

func stopLoading()

Stops the loading of any web content managed by the receiver.

func reload()

Reloads the current page.