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.

See Also

Creating Specialized Image Objects

func imageFlippedForRightToLeftLayoutDirection() -> UIImage

Returns the current image, prepared to flip horizontally when it’s in a right-to-left layout.

func withHorizontallyFlippedOrientation() -> UIImage

Returns a version of the image whose image orientation is the mirror of the original image.

func withRenderingMode(UIImage.RenderingMode) -> UIImage

Creates and returns a new image object with the specified rendering mode.

func withAlignmentRectInsets(UIEdgeInsets) -> UIImage

Returns a new version of the image that uses the specified alignment insets.

func resizableImage(withCapInsets: UIEdgeInsets) -> UIImage

Creates and returns a new image object with the specified cap insets.

func resizableImage(withCapInsets: UIEdgeInsets, resizingMode: UIImage.ResizingMode) -> UIImage

Creates and returns a new image object with the specified cap insets and options.