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

# willMove(to:)

Performs an action before the view adds or removes the interaction from its interaction array.

## Declaration

```swift
@MainActor @preconcurrency final func willMove(to view: UIView?)
```

## Parameters

- `view`: The view that owns and contains the interaction in its interaction array.

## See Also

### Responding to view events

- [didMove(to:)](visionkit/imageanalysisinteraction/didmove(to:).md)
