Type Method

animatedResizableImageNamed:capInsets:resizingMode:duration:

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

Declaration

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

Parameters

name

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

capInsets

The values to use for the cap insets.

resizingMode

The mode with which the interior of the image is resized.

duration

The duration of the animation.

Return Value

A new animated image object with the specified cap insets and resizing mode.

Discussion

This method is exactly the same as its counterpart animatedResizableImageNamed:capInsets:duration: except that the resizing mode of the new image object can be explicitly declared. Since the resizing mode of an image is UIImageResizingModeTile by default, this method should only be used in place of its counterpart to create an animated image that needs to be resized with the UIImageResizingModeStretch resizing mode.

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:duration:

Creates and returns an animated image with end caps.