iOS Guides | Samples

MonoTouch.UIKit.UIDynamicItem Class

A class that can be affected by UIDynamicBehaviors.

See Also: UIDynamicItem

Syntax

[MonoTouch.Foundation.Model]
[MonoTouch.Foundation.Protocol]
[MonoTouch.Foundation.Register("UIDynamicItem", false)]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 7, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
public abstract class UIDynamicItem : NSObject, IUIDynamicItem, IDisposable

Remarks

Describes the elements that can be affected by the animator. Classes that implement the methods of this interface can be controlled by the UIDynamicAnimator.

iOS 7 introduced UI Dynamics, which provides physics-based animation for UI elements. The overall coordination of UI Dynamics is performed by a UIDynamicAnimator, which holds references to a number of UIDynamicBehaviors, which define behaviors such as gravity, pushing, and collision detection. Each UIDynamicBehavior holds references to some amount of IUIDynamicItems, which represent the objects to which the physics model is applied.

While this class contains the full protocol definition, and allows for users to override the methods manually in subclasses, if you want to create your own items that can be animated by the physics engine, all you have to do is implement the IUIDynamicItem interface in your object.

Two classes that implement IUIDynamicItem are UIView and UICollectionViewLayoutAttributes.

Related content

Requirements

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

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

See Also: NSObject

Public Constructors

Default constructor, initializes a new instance of this class.
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.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
abstract
BoundsRectangleF. The usable frame of your object.
abstract
CenterPointF. Center of your object, in the container coordinate space.
[read-only]
CollisionBoundingPathUIBezierPath. Gets the UIBezierPath to be used for collision detection.
[read-only]
CollisionBoundsTypeUIDynamicItemCollisionBoundsType. Gets the UIDynamicItemCollisionBoundsType describing the type of bounds used for collision detected.
abstract
TransformCGAffineTransform. The transform of your object, relative to the center of its bounds.