iOS Guides | Samples

MonoTouch.UIKit.UIGravityBehavior Class

A UIDynamicBehavior that models a gravity vector.

See Also: UIGravityBehavior

Syntax

[MonoTouch.Foundation.Register("UIGravityBehavior", true)]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 7, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
public class UIGravityBehavior : UIDynamicBehavior

Remarks

A UIGravityBehavior is a UIDynamicBehavior that applies a gravity vector defined by UIGravityBehavior.Direction and UIGravityBehavior.Magnitude to the IUIDynamicItems in its UIGravityBehavior.Items array.

The gravity vector is defined using the UIKit Gravity constant of 1000 points/second^2.

IUIDynamicItems can be added and removed dynamically from the UIGravityBehavior.Items array.

Related content

Requirements

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

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

See Also: UIDynamicBehavior

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

AngleSingle. The angle, in radians, of the gravity vector for this UIGravityBehavior.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
GravityDirectionCGVector. The direction of the gravity vector, as an (x,y) tuple.
[read-only]
ItemsIUIDynamicItem[]. The dynamic items on which this UIGravityBehavior operates. Read-only.
MagnitudeSingle. The magnitude of the gravity vector.

Public Methods

AddItem(IUIDynamicItem)
Adds an item to this UIGravityBehavior's Items.
RemoveItem(IUIDynamicItem)
Removes an item from this UIGravityBehavior's Items.
SetAngleAndMagnitude(Single, Single)
Sets both the angle and magnitude of the gravity vector of this UIGravityBehavior.