CLGeocodeCompletionHandler
A block to be called when a geocoding request is complete.
Declaration
typealias CLGeocodeCompletionHandler = ([CLPlacemark]?, (any Error)?) -> VoidDiscussion
Upon completion of a geocoding request, a block of this form is called to give you a chance to process the results. The parameters of this block are as follows:
placemarkContains an array of CLPlacemark objects. For most geocoding requests, this array should contain only one entry. However, forward-geocoding requests may return multiple placemark objects in situations where the specified address could not be resolved to a single location.
If the request was canceled or there was an error in obtaining the placemark information, this parameter is nil.
errorContains
nilor an error object indicating why the placemark data was not returned. For a list of possible error codes, see CLError.Code.