One Logo Pool Ball
VisionKit · IOS API REFERENCE

ImageAnalysisInteractionDelegate

protocol · iOS 16.0+ · SDK 27.1

@MainActor protocol ImageAnalysisInteractionDelegate : AnyObject

A delegate that handles image-analysis and user-interaction callbacks for an interaction object. The delegate of an ``ImageAnalysisInteraction`` object implements this protocol to provide interface details and to customize the response for a person's interaction.

Members (7)

method · iOS 16.0+

contentView

Swift declaration
@MainActor func contentView(for interaction: ImageAnalysisInteraction) -> UIView?

A default implementation that provides the interaction's view. - Returns: The interaction's view.

method · iOS 16.0+

interaction

Swift declaration
@MainActor func interaction(_ interaction: ImageAnalysisInteraction, shouldBeginAt point: CGPoint, for interactionType: ImageAnalysisInteraction.InteractionTypes) -> Bool

A default implementation that indicates that the interaction begins. - Returns: This default implementation returns `true`.

method · iOS 16.0+

interaction

Swift declaration
@MainActor func interaction(_ interaction: ImageAnalysisInteraction, highlightSelectedItemsDidChange highlightSelectedItems: Bool)

A default, blank implementation for when recognized items in the image appear highlighted as a result of a person tapping the Live Text button.

method · iOS 16.0+

interaction

Swift declaration
@MainActor func interaction(_ interaction: ImageAnalysisInteraction, liveTextButtonDidChangeToVisible visible: Bool)

A default, blank implementation for when the Live Text button appears or disappears.

method · iOS 16.0+

contentsRect

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

A default unit rectangle that represents the full size of the interaction view. - Returns: A unit rectangle with origin `(0, 0)` and the same width and height as the interaction view.

method · iOS 16.0+

textSelectionDidChange

Swift declaration
@MainActor func textSelectionDidChange(_ interaction: ImageAnalysisInteraction)

A default, blank implementation for when the text selection changes.

method · iOS 16.0+

presentingViewController

Swift declaration
@MainActor func presentingViewController(for interaction: ImageAnalysisInteraction) -> UIViewController?

A default implementation that provides the interaction view's root view controller. - Returns: The interaction view's root view controller.

Skipped declarations

No declarations were skipped in this snapshot.

All VisionKit types →