UIDynamicAnimator.AddBehavior(UIDynamicBehavior) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified behavior to the animator.
[Foundation.Export("addBehavior:")]
public virtual void AddBehavior (UIKit.UIDynamicBehavior behavior);
abstract member AddBehavior : UIKit.UIDynamicBehavior -> unit
override this.AddBehavior : UIKit.UIDynamicBehavior -> unit
Parameters
- Attributes
Remarks
The following example shows how you can add a simple behavior to an animator:
//
// Add gravity to the "simpleView" subview, this will make it fall
//
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
animator = new UIDynamicAnimator (View);
animator.AddBehavior (new UIGravityBehavior (simpleView));
}