---
title: contentsRect
framework: visionkit
role: symbol
role_heading: Instance Property
path: visionkit/imageanalysisoverlayview/contentsrect
---

# contentsRect

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

## Declaration

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

## Discussion

Discussion If your app displays the image with NSImageView and you assign it to the 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].

## See Also

### Managing custom image views

- [setContentsRectNeedsUpdate()](visionkit/imageanalysisoverlayview/setcontentsrectneedsupdate().md)
