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.