cancelDataRequest(_:)
Cancels an asynchronous request.
Declaration
func cancelDataRequest(_ requestID: PHAssetResourceDataRequestID)Parameters
- requestID:
The numeric identifier of the request to be canceled.
Discussion
When you perform an asynchronous request for asset resource data using the requestData(for:options:dataReceivedHandler:completionHandler:) method, the image manager returns a numeric identifier for the request. To cancel the request before it completes, provide this identifier when calling the cancelDataRequest(_:) method.