Type Method

animatedImage(with:duration:)

Creates and returns an animated image from an existing set of images.

Declaration

class func animatedImage(with images: [UIImage], duration: TimeInterval) -> UIImage?

Parameters

images

An array of UIImage objects.

duration

The duration of the animation.

Return Value

A new image object.

Discussion

All images included in the animated image should share the same size and scale.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software