iOS Guides | Samples

MonoTouch.UIKit.UIImage.CreateAnimatedImage Method

Creates an animated image from a series of files with the end caps applied.

Syntax

[System.Obsolete("This always returns null. Use the overload that accept a System.String 'name' instead.")]
public static UIImage CreateAnimatedImage (UIImage[] images, UIEdgeInsets capInsets, Double duration)

Parameters

images
The path and filename of images to load, without the suffix (i.e. .JPG)
capInsets
This argument lets you specify the top, left, bottom and right inset (the sizes of your images).
duration
How long the animation will last.

Returns

A single animated image.

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.

Consider the following image, the capInsets specify these borders:

This can be used from a background thread.

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0