Type Method

animatedResizableImageNamed:capInsets:duration:

Creates and returns an animated image with end caps.

Declaration

+ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration;

Parameters

name

The full or partial path to the file (sans suffix).

capInsets

The values to use for the cap insets.

duration

The duration of the animation.

Return Value

A new image object.

Discussion

This method loads a series of files by appending a series of numbers to the base file name provided in the name parameter. For example, if the name parameter had ‘image’ as its contents, this method would attempt to load images from files with the names ‘image0’, ‘image1’ and so on all the way up to ‘image1024’. All images included in the animated image should share the same size and scale.

Each frame in the animation follows the rules for resizable images created by the resizableImageWithCapInsets: method.

See Also

Creating Animated Images

+ animatedImageNamed:duration:

Creates and returns an animated image.

+ animatedImageWithImages:duration:

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

+ animatedResizableImageNamed:capInsets:resizingMode:duration:

Creates and returns an animated image with end caps and a specific resizing mode.