Instance Method


Adds a dynamic behavior, as a child, to a custom dynamic behavior.


func addChildBehavior(_ behavior: UIDynamicBehavior)



The dynamic behavior you want to add as a child.

The parent behavior ignores your use of this method if you:

  • Provide a nil value

  • Provide a behavior instance that you’ve already added to the behavior


Call this method only on custom subclasses of the UIDynamicBehavior class.

See Also

Configuring a Dynamic Behavior

var action: (() -> Void)?

The block you want to execute during dynamic animation.

var childBehaviors: [UIDynamicBehavior]

Returns the array of dynamic behaviors that are children of a custom dynamic behavior.

func removeChildBehavior(UIDynamicBehavior)

Removes a child dynamic behavior from a custom dynamic behavior.