Instance Method

finishLoading(with:)

Causes the receiver to handle the failure to load a resource for which a resource loader’s delegate took responsibility.

Declaration

func finishLoading(with error: Error?)

Parameters

error

An error object indicating the reason for the failure.

Discussion

When a resource loader’s delegate takes responsibility for loading a resource, it calls this method when a failure occurred when loading the resource. This method marks the loading request as finished and notifies the resource loader object that the resource could not be loaded.

See Also

Reporting the Result of the Request

var response: URLResponse?

The URL response for the loading request.

func finishLoading(with: URLResponse?, data: Data?, redirect: URLRequest?)

Causes the receiver to finish loading a resource for which a resource loader’s delegate took responsibility .

Deprecated
func finishLoading()

Causes the receiver to treat the processing of the request as complete.

var isCancelled: Bool

A Boolean value that indicates whether the request has been cancelled.

var isFinished: Bool

A Boolean value that indicates whether loading of the resource has finished.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software