UIKit.UIDynamicAnimator.AddBehavior Method
Adds the specified behavior to the animator.

Syntax

[Foundation.Export("addBehavior:")]
public virtual void AddBehavior (UIDynamicBehavior behavior)

Parameters

behavior

Behavior to add to the animator.

This parameter can be null.

Remarks

The following example shows how you can add a simple behavior to an animator:

C# Example

// 
// 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));
}
	    

Requirements

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