---
title: "willMove(to:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uidynamicbehavior/willmove(to:)"
---

# willMove(to:)

Called when the dynamic behavior is added to, or removed from, a dynamic animator.

## Declaration

```swift
func willMove(to dynamicAnimator: UIDynamicAnimator?)
```

## Parameters

- `dynamicAnimator`: The dynamic animator that the behavior is being added to, or nil if being removed from an animator.

## Discussion

Discussion Use this method as the override point for responding to changes in the UIKit Dynamics behavior tree that involve the dynamic behavior.

## See Also

### Responding to changes in the behavior tree

- [dynamicAnimator](uikit/uidynamicbehavior/dynamicanimator.md)
