iOS Guides | Samples

MonoTouch.UIKit.UIPushBehavior Class

Applies an instantaneous or continuous force vector to a IUIDynamicItem.

See Also: UIPushBehavior


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


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


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

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.
ClassHandleIntPtr. The handle for this class.
ItemsIUIDynamicItem[]. The dynamic items associated with this UIPushBehavior. Read-only.
MagnitudeSingle. The magnitude of the force vector for this UIPushBehavior.
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

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.
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.