frame(forAdornmentWithID:)
Returns the current frame of the specified adornment.
Declaration
@MainActor @preconcurrency func frame(forAdornmentWithID adornmentID: UUID) -> CGRect?Parameters
- adornmentID:
The ID of the
MarkupAdornmentwhose frame you want to retrieve.
Return Value
The frame of the adornment in the coordinate system of this view controller’s view, or nil if the canvas does not display the adornment or cannot determine its frame.
Discussion
This method calculates the visual frame of an adornment based on its anchor position, image size, attachment point, zoom scale and content offset.