iOS Guides | Samples

MonoTouch.UIKit.UIImage.CreateAnimatedImage Method

Creates an animated image from a series of files.

Syntax

[MonoTouch.Foundation.Export("animatedImageNamed:duration:")]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 5, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
[MonoTouch.ObjCRuntime.ThreadSafe]
public static UIImage CreateAnimatedImage (String name, Double duration)

Parameters

name
The path and filename of images to load, without the suffix (i.e. .JPG)
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.

This can be used from a background thread.

Requirements

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