<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/ImageAnalysisInteraction/contentsRect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit24ImageAnalysisInteractionC12contentsRectSo6CGRectVvp"
  },
  "title" : "contentsRect"
}
-->

# contentsRect

A rectangle, in unit coordinate space, that describes the content area
of the interaction.

```
@MainActor final var contentsRect: CGRect { get }
```

## Discussion

If the interaction’s view isn’t an instance of
<doc://com.apple.documentation/documentation/UIKit/UIImageView>, your app sets the value for this property by implementing the [`ImageAnalysisInteractionDelegate`](/documentation/VisionKit/ImageAnalysisInteractionDelegate) callback [`contentsRect(for:)`](/documentation/VisionKit/ImageAnalysisInteractionDelegate/contentsRect(for:)). The
default return value is the unit rectangle, `[0.0, 0.0, 1.0, 1.0]`, which represents the whole view contents.

---

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)