<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDynamicBehavior/willMove(to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDynamicBehavior(im)willMoveToAnimator:"
  },
  "title" : "willMove(to:)"
}
-->

# willMove(to:)

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

```
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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)