Instance Method

download(with:)

Returns a connection object and starts downloading the issue asset with a specified delegate to handle callbacks.

Declaration

func download(with delegate: NSURLConnectionDownloadDelegate) -> NSURLConnection

Parameters

delegate

A object that adopts the NSURLConnectionDownloadDelegate protocol and implements the methods related to issue-asset downloads.

Return Value

An object representing the URL connection.

Discussion

Upon receipt of this message, the Newsstand Kit framework creates a NSURLConnection object from the NSURLRequest object encapsulated by the receiver, returns the connection object, and typically begins downloading the issue asset. (If the download is already underway, it simply returns the associated connection object.) It sends messages to the connection-download delegate at the appropriate junctures until the download concludes.