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

# contentsRect

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

## Declaration

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

## Discussion

Discussion If the interaction’s view isn’t an instance of UIImageView, your app sets the value for this property by implementing the ImageAnalysisInteractionDelegate callback contentsRect(for:). The default return value is the unit rectangle, [0.0, 0.0, 1.0, 1.0], which represents the whole view contents.

## See Also

### Managing custom image views

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