Delivers the image to the specified completion handler.
- iOS 11.0+
- Mac Catalyst 13.0+
The completion handler block that is executed when the image data is available. You must provide this handler. This block has no return value and takes the following parameter:
The image data in a
UIImageobject. If there was an error retrieving the image, this parameter is
Use this method to fetch a UIImage object containing the image data. If you do not provide a handler for the
completion parameter, this method does nothing.
If the image data is already local to the device and readily available, this method executes your completion handler on the current thread immediately. If the data must be fetched, perhaps because the data must be downloaded from a URL, this method executes your handler asynchronously on an arbitrary thread.