iOS Guides | Samples

MonoTouch.UIKit.UIImageView Class

A UIView that can render a single image or animate a series of images.

See Also: UIImageView

Syntax

[MonoTouch.Foundation.Register("UIImageView", true)]
public class UIImageView : UIView

Remarks

New UIImageView objects ignore user-input (eg. touches) by default. To handle events in a subclass, set UIView.UserInteractionEnabled = true after the object has been created.

The image is scaled, sized to fit or positioned in the UIImageView according to the UIView.ContentMode property. If either UIImage.LeftCapWidth or UIImage.TopCapHeight are set, the image is stretched according to those values instead.

This view is aware of stretchable images created with UIImage.CreateResizableImage(UIEdgeInsets)

The class provides controls to set the duration and frequency when animating multiple images. It also allows you to stop and start the animation. All images associated with a UIImageView object should use the same scale.

Related content

Requirements

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

The members of MonoTouch.UIKit.UIImageView are listed below.

See Also: UIView

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
Creates a UIImageView with the UIImageView.Image already set.
Initializes the UIImageView with the specified frame.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.
Creates a UIImageView with the UIImageView.Image and UIImageView.HighlightedImage properties already set.

Public Properties

AnimationDurationDouble. Number of seconds to cycle through the UIImageView.AnimationImages once.
AnimationImagesUIImage[]. An array of UIImage to animate.
AnimationRepeatCountInt32. The number of times to repeat the animation.
[read-only]
static
AppearanceUIImageView+UIImageViewAppearance. Strongly-typed property that returns the UIAppearance class for this class.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
HighlightedBoolean. Whether the UIImageView is highlighted.
HighlightedAnimationImagesUIImage[]. An array of UIImage to animate when the view is UIImageView.Highlighted.
HighlightedImageUIImage. Thie image to display when the UIImageView is highlighted.
ImageUIImage. Thie image to display in the UIImageView.
[read-only]
IsAnimatingBoolean. Whether the animation is running or not.

Public Methods

static
AppearanceWhenContainedIn(params Type[]) : UIImageView+UIImageViewAppearance
Returns a strongly typed UIAppearance for instances of this class when the view is hosted in the specified hierarchy.
static
GetAppearance(UITraitCollection) : UIImageView+UIImageViewAppearance
Returns an appearance proxy for the specified traits.
static
GetAppearance(UITraitCollection, params Type[]) : UIImageView+UIImageViewAppearance
Returns an appearance proxy for the specified traits when found in the containers containment hierarchy.
static
GetAppearance<T>() : UIImageView+UIImageViewAppearance
Obtains the appearance proxy UIImageViewAppearance for the subclass of UIImageView.
static
GetAppearance<T>(UITraitCollection) : UIImageView+UIImageViewAppearance
Obtains the appearance proxy UIImageViewAppearance for the subclass of UIImageView.
static
GetAppearance<T>(UITraitCollection, params Type[]) : UIImageView+UIImageViewAppearance
Obtains the appearance proxy UIImageViewAppearance for the subclass of UIImageView that has the specified trait collection when the view is hosted in the specified hierarchy.
StartAnimating()
Starts animating images in the UIImageView.
StopAnimating()
Stops the animation.