iOS Guides | Samples

MonoTouch.UIKit.UICollisionBehavior Class

Detects boundary touches between IUIDynamicItems and boundaries or other IUIDynamicItems.

See Also: UICollisionBehavior


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


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

Application developers should be aware that collision detection has a relatively high processor cost.

Related content


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

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

BoundaryIdentifiersNSObject[]. The boundary identifiers to which the collision behavior is associated. Read-only.
ClassHandleIntPtr. The handle for this class.
CollisionDelegateUICollisionBehaviorDelegate. The delegate object that receives events relating to collisions.
CollisionModeUICollisionBehaviorMode. Whether the UICollisionBehavior.Items should collide with boundaries, each other, or both.
ItemsIUIDynamicItem[]. The dynamic items added to this UICollisionBehavior.
TranslatesReferenceBoundsIntoBoundaryBoolean. Creates a set of boundaries based on the bounds of the reference view of the UIDynamicAnimator.
WeakCollisionDelegateNSObject. The delegate object used to respond to collisions.

Public Methods

AddBoundary(NSObject, UIBezierPath)
Creates a boundary defined by an approximation of the bezierPath.
AddBoundary(NSObject, PointF, PointF)
Creates a boundary defined by the provided end points.
Adds a dynamic item to this UICollisionBehavior's Items.
GetBoundary(NSObject) : UIBezierPath
Retrieves a boundary Bezier path.
Removes all collision boundaries from the UICollisionBehavior.
Removes a specific collision boundary from the collision behavior.
Removes the specified dynamic item from this UICollisionBehavior's Items.
Creates a set of boundaries inset from the bounds of the reference view of the UIDynamicAnimator.

Protected Methods

Releases the resources used by the UICollisionBehavior object.

Public Events

BeganBoundaryContactEvent raised by the object.
BeganContactEvent raised by the object.
EndedBoundaryContactEvent raised by the object.
EndedContactEvent raised by the object.