Type Alias

MKMapSnapshotter.CompletionHandler

A block that processes the results of a snapshot request.

Declaration

typealias CompletionHandler = (MKMapSnapshotter.Snapshot?, Error?) -> Void

Discussion

This block takes the following parameters:

snapshot

The image data that was generated or nil if an error occurred

error

The error that occurred or nil if the snapshot was generated successfully.

See Also

Generating a Snapshot

func start(completionHandler: MKMapSnapshotter.CompletionHandler)

Submits the request to create a snapshot and delivers the results to the specified block.

func start(with: DispatchQueue, completionHandler: MKMapSnapshotter.CompletionHandler)

Submits the request to create a snapshot and executes the resulting block on the specified queue.

func cancel()

Cancels the current request to create a snapshot.

var isLoading: Bool

A Boolean value indicating whether the snapshotter is currently generating an image.