<!--
{
  "availability" : [
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/ImageAnalysisOverlayView/contentsRect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit24ImageAnalysisOverlayViewC12contentsRectSo6CGRectVvp"
  },
  "title" : "contentsRect"
}
-->

# contentsRect

Returns the rectangle, in unit coordinates, that contains the image within the superview.

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

## Discussion

If your app displays the image with <doc://com.apple.documentation/documentation/AppKit/NSImageView> and you assign it to the [`trackingImageView`](/documentation/VisionKit/ImageAnalysisOverlayView/trackingImageView) property, the framework doesn’t require you to implement this property.

The default value is the entire contents of the superview, which is the unit rectangle `[0.0, 0.0, 1.0, 1.0]`.

---

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)