iOS Guides | Samples

UIKit.UIDynamicBehavior Class

The base class for items that describe the physics-like behaviors of UIKit Dynamics, introduced in iOS 7.

See Also: UIDynamicBehavior

Syntax

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

Remarks

A number of UIDynamicBehaviors are associated with a UIDynamicAnimator, which is responsible for the overall context. Any given UIDynamicBehavior is associated with some amount of IUIDynamicItems (such as UIViews and UICollectionViewLayoutAttributes); most subclasses of UIDynamicBehavior expose these in an Items property or application developers can retrieve them with UIDynamicAnimator.GetDynamicItems.

There are a number of predefined subclasses of UIDynamicBehavior:

SubclassBehavior
UIAttachmentBehavior Attachment: Specifies a dynamic connection between two IUIDynamicItems or between a IUIDynamicItem and a fixed point.
UICollisionBehavior Collision: Detects when the boundaries of a IUIDynamicItem meet another boundary.
UIGravityBehavior Gravity: Accelerates the IUIDynamicItem towards the bottom of the screen.
UIDynamicItemBehavior Animation: Specifies an animation configuration to apply to one or more IUIDynamicItems.
UIPushBehavior Pushing: Applies a continuous or instantaneous force vector to a IUIDynamicItem.
UISnapBehavior Snapping: Specifies a magnetism-like attraction between a IUIDynamicItem and a fixed point. Includes a rebounding effect.

Related content

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of UIKit.UIDynamicBehavior are listed below.

See Also: NSObject

Public Constructors

Default constructor, initializes a new instance of this class.

Protected Constructors

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

ActionAction. The NSAction that executes during dynamic animation.
[read-only]
ChildBehaviorsUIDynamicBehavior[]. The children UIDynamicBehaviors of this UIDynamicBehavior. Read-only.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
DynamicAnimatorUIDynamicAnimator. The UIDynamicAnimator associated with this UIDynamicBehavior. Read-only.

Public Methods

AddChildBehavior(UIDynamicBehavior)
Adds a UIDynamicBehavior to this UIDynamicBehavior's ChildBehaviors.
RemoveChildBehavior(UIDynamicBehavior)
Removes a UIDynamicBehavior from this UIDynamicBehavior's ChildBehaviors.
WillMoveToAnimator(UIDynamicAnimator)
Indicates that this UIDynamicBehavior has been added or removed from a UIDynamicAnimator.