UIImage.CreateAnimatedImage Method

Definition

Overloads

CreateAnimatedImage(String, UIEdgeInsets, Double)

Creates a new animated image by loading a set of identically sized and scaled image files that have names that begin with name and that have sequential numerical suffixes.

CreateAnimatedImage(String, UIEdgeInsets, UIImageResizingMode, Double)

Factory method to create an animated image with end caps and the specified resizingMode.

CreateAnimatedImage(String, Double)

Creates an animated image from a series of files.

CreateAnimatedImage(UIImage[], Double)

This method will create a animated image from a collection of images.

CreateAnimatedImage(String, UIEdgeInsets, Double)

Creates a new animated image by loading a set of identically sized and scaled image files that have names that begin with name and that have sequential numerical suffixes.

[Foundation.Export("animatedResizableImageNamed:capInsets:duration:")]
[ObjCRuntime.ThreadSafe]
public static UIKit.UIImage CreateAnimatedImage (string name, UIKit.UIEdgeInsets capInsets, double duration);
static member CreateAnimatedImage : string * UIKit.UIEdgeInsets * double -> UIKit.UIImage

Parameters

name
String
capInsets
UIEdgeInsets
duration
Double

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

CreateAnimatedImage(String, UIEdgeInsets, UIImageResizingMode, Double)

Factory method to create an animated image with end caps and the specified resizingMode.

[Foundation.Export("animatedResizableImageNamed:capInsets:resizingMode:duration:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.ThreadSafe]
public static UIKit.UIImage CreateAnimatedImage (string name, UIKit.UIEdgeInsets capInsets, UIKit.UIImageResizingMode resizingMode, double duration);
static member CreateAnimatedImage : string * UIKit.UIEdgeInsets * UIKit.UIImageResizingMode * double -> UIKit.UIImage

Parameters

name
String

The path and filename of images to load, without the suffix (i.e. .JPG)

capInsets
UIEdgeInsets

This argument lets you specify the top, left, bottom and right inset (the sizes of your images).

resizingMode
UIImageResizingMode

Controls whether the areas are stretched or tiled.

duration
Double

Duration of the animation.

Returns

Attributes

Remarks

Consider the following image, the capInsets specify these borders:

The resizing mode controls whether the image is stretched or tiled

This can be used from a background thread.

Applies to

CreateAnimatedImage(String, Double)

Creates an animated image from a series of files.

[Foundation.Export("animatedImageNamed:duration:")]
[ObjCRuntime.ThreadSafe]
public static UIKit.UIImage CreateAnimatedImage (string name, double duration);
static member CreateAnimatedImage : string * double -> UIKit.UIImage

Parameters

name
String

The path and filename of images to load, without the suffix (i.e. .JPG)

duration
Double

How long the animation will last.

Returns

A single animated image.

Attributes

Remarks

All images that are to be loaded should be of the same size and scale. This method will load files by appending an integer (in the range of 0-1024) to the end of file and loading that file. For example, if name was 'my_image', this method will create an animation of all files from 'my_image0' to 'my_image1024' inclusive.

This can be used from a background thread.

Applies to

CreateAnimatedImage(UIImage[], Double)

This method will create a animated image from a collection of images.

[Foundation.Export("animatedImageWithImages:duration:")]
[ObjCRuntime.ThreadSafe]
public static UIKit.UIImage CreateAnimatedImage (UIKit.UIImage[] images, double duration);
static member CreateAnimatedImage : UIKit.UIImage[] * double -> UIKit.UIImage

Parameters

images
UIImage[]

A collection of UIImages to make up the animation.

duration
Double

The dureation of the animation in seconds.

Returns

Attributes

Remarks

The source images should all be the same size and scale.

This can be used from a background thread.

Applies to