MKMapView

  • Submits the request to create a snapshot of the map view and delivers the results to the specified block.

    Declaration

    Swift

    func snapshot(defaultSize: CGSize? = nil,
                  completionHandler: @escaping (MKMapSnapshot?, Error?) -> Void)

    Parameters

    defaultSize

    An optional size to use in case the view has an empty frame.

    completionHandler

    The block to call with the resulting snapshot. This block is executed on the app’s main thread and must not be nil.