iOS Guides | Samples

MonoTouch.UIKit.UIImage.CreateAnimatedImage Method

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

Syntax

[MonoTouch.Foundation.Export("animatedResizableImageNamed:capInsets:resizingMode:duration:")]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 6, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
[MonoTouch.ObjCRuntime.ThreadSafe]
public static UIImage CreateAnimatedImage (String name, UIEdgeInsets capInsets, UIImageResizingMode resizingMode, Double duration)

Parameters

name
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).
resizingMode
Controls whether the areas are stretched or tiled.
duration
Duration of the animation.

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.

Requirements

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