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

# willMove(to:)

Tells the interaction that a view will add or remove it from the view’s interactions array.

## Declaration

```swift
func willMove(to view: UIView?)
```

## Parameters

- `view`: The view that will contain, and own, the interaction in its interactions array. If the view is nil, the interaction’s owner will remove the interaction from its interactions array.

## See Also

### Tracking the Movements

- [didMove(to:)](uikit/uiinteraction/didmove(to:).md)
