iOS Guides | Samples

MonoTouch.UIKit.UIPushBehavior Class

Applies an instantaneous or continuous force vector to a IUIDynamicItem.

See Also: UIPushBehavior

Syntax

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

Remarks

The UIPushBehavior.SetTargetOffset method can be used so that the force vector is applied to a location other than the IUIDynamicItem.Center location.

The unit used for force is the "UIKit Newton" which is defined as accelerating a (100,100)-sized view to 100 points / second^2. If the UIPushBehavior.Mode is UIPushBehaviorMode.Instantaneous, the velocity of the IUIDynamicItem changes immediately.

After an instaneous push is applied, the UI Dynamics engine sets the value of UIPushBehavior.Active to false.

Related content

Requirements

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

The members of MonoTouch.UIKit.UIPushBehavior 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

ActiveBoolean. Whether the UIPushBehavior is active.
AngleSingle. The angle, in radians, of the force vector for this UIPushBehavior.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
ItemsIUIDynamicItem[]. The dynamic items associated with this UIPushBehavior. Read-only.
MagnitudeSingle. The magnitude of the force vector for this UIPushBehavior.
[read-only]
ModeUIPushBehaviorMode. The force mode for this UIPushBehavior. Read-only.
PushDirectionCGVector. The direction of the force vector for this UIPushBehavior, expressed as x and y components and using UIKit geometry.

Public Methods

AddItem(IUIDynamicItem)
Adds the specified dynamic item to this UIPushBehavior's Items.
GetTargetOffsetFromCenter(IUIDynamicItem) : UIOffset
The offset from the center of the dynamic item at which the force vector is applied.
RemoveItem(IUIDynamicItem)
Removes the specified dynamic item from this UIPushBehavior's Items.
SetAngleAndMagnitude(Single, Single)
Specifies the angle, in radians, and magnitude of the force vector for this UIPushBehavior.
SetTargetOffset(UIOffset, IUIDynamicItem)
Specifies an offset from the center of the dynamic item at which to apply the force vector.