Instance Method


Adds a dynamic item to the dynamic item behavior’s item array.


func addItem(_ item: UIDynamicItem)



The dynamic item to add to the item array.


You can add a dynamic item to one or more dynamic item behaviors. For example, you could add a dynamic item to one dynamic item behavior to configure the item’s elasticity and to a second dynamic item behavior to configure its density. This is especially useful when you are defining custom, combined behaviors for your dynamic items.

See Also

Initializing and Managing a Dynamic Item Behavior

init(items: [UIDynamicItem])

Initializes a dynamic item behavior with an array of dynamic items.

func removeItem(UIDynamicItem)

Removes a specific dynamic item from the dynamic item behavior.

var items: [UIDynamicItem]

Returns the set of dynamic items you’ve added to the dynamic item behavior.