<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/ImageAnalysisInteractionDelegate/contentView(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit32ImageAnalysisInteractionDelegateP11contentView3forSo6UIViewCSgAA0cdE0C_tF"
  },
  "title" : "contentView(for:)"
}
-->

# contentView(for:)

Provides the view that contains the image.

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

## Parameters

`interaction`

The associated interaction object for the content view.

## Return Value

The view that contains the image for this interaction.

## Discussion

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

---

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)