generateCGImagesAsynchronously(forTimes:completionHandler:)
Generates images asynchronously for an array of requested times, and returns the results in a callback.
Declaration
func generateCGImagesAsynchronously(forTimes requestedTimes: [NSValue], completionHandler handler: @escaping AVAssetImageGeneratorCompletionHandler)Parameters
- requestedTimes:
An array of times, contained in NSValue objects, in the video timeline for which to generate images.
- handler:
A callback that the image generator invokes for each requested image time.
Discussion
Swift clients should prefer the asynchronous images(for:) method instead.