Contents

contentsRect(for:)

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

Declaration

@MainActor func contentsRect(for interaction: ImageAnalysisInteraction) -> CGRect

Parameters

  • interaction:

    The associated interaction object for the contents rectangle.

Mentioned in

Return Value

The rectangle of the image within the view, in unit coordinates. The default return value is the unit rectangle, [0.0, 0.0, 1.0, 1.0], which represents the whole view contents.

Discussion

Implement this method when the interaction view type isn’t UIImageView.

See Also

Providing interface details