---
title: "contentView(for:)"
framework: visionkit
role: symbol
role_heading: Instance Method
path: "visionkit/imageanalysisinteractiondelegate/contentview(for:)"
---

# contentView(for:)

Provides the view that contains the image.

## Declaration

```swift
@MainActor func contentView(for interaction: ImageAnalysisInteraction) -> UIView?
```

## Parameters

- `interaction`: The associated interaction object for the content view.

## Return Value

Return Value The view that contains the image for this interaction.

## Discussion

Discussion Implement this delegate method only when the view that contains the image isn’t the same as the interaction’s view.

## See Also

### Providing interface details

- [contentsRect(for:)](visionkit/imageanalysisinteractiondelegate/contentsrect(for:).md)
- [presentingViewController(for:)](visionkit/imageanalysisinteractiondelegate/presentingviewcontroller(for:).md)
