The types of interactions that people can perform with an image.
Members (9)
get · iOS 16.0+
imageSubject
TypeScript
get imageSubject(): Promise<ImageAnalysisInteraction_InteractionTypes>
Swift declaration
static let imageSubject: ImageAnalysisInteraction.InteractionTypes
An option that enables people to use a long-press gesture on a subject in an image to separate it from the background.
For more information about image subjects, see ``VisionKit/ImageAnalysisInteraction/Subject``.
get · iOS 16.0+
visualLookUp
TypeScript
get visualLookUp(): Promise<ImageAnalysisInteraction_InteractionTypes>
Swift declaration
static let visualLookUp: ImageAnalysisInteraction.InteractionTypes
An option that presents a button for more information on any subjects the framework recognizes in the image.
When the framework identifies something familiar in an image that it can provide more information about (see ``ImageAnalysisInteraction/Subject``), it offers
a button in the bottom-right corner of the view. When people tap the button, a modal sheet appears that offers info about the subject.
For example, if the image contains a dog, the modal sheet describes the dog's breed and provides a relevant web URL where people can read more about the breed.
VisionKit supports Visual Look Up when it recognizes the following subjects:
- Plants and flowers
- Animals, such as cats, dogs, birds, reptiles, and insects
- Places, such as constructed landmarks, sculptures, and natural landmarks
- Art and media, such as paintings, books, and album covers
- Food, such as prepared dishes and desserts
- Symbols, such as laundry care labels and vehicle dashboard indicators
get · iOS 16.0+
dataDetectors
TypeScript
get dataDetectors(): Promise<ImageAnalysisInteraction_InteractionTypes>
Swift declaration
static let dataDetectors: ImageAnalysisInteraction.InteractionTypes
An option that enables interaction with text of certain formats,
such as URLs, email addresses, and physical addresses.
People interact with *data detectors*, or UI that highlights each instance of
the recognized formats in text that's on an image. The data detectors appear without a Live Text button, because
people can't interact with other text with this option.
get · iOS 16.0+
textSelection
TypeScript
get textSelection(): Promise<ImageAnalysisInteraction_InteractionTypes>
Swift declaration
static let textSelection: ImageAnalysisInteraction.InteractionTypes
An option that enables text selection, copying, and translating.
People can select text to perform actions. In this mode, the framework disables data detectors (``VisionKit/ImageAnalysisInteraction/InteractionTypes/dataDetectors``) by default. However, if you set the
``ImageAnalysisInteraction/allowLongPressForDataDetectorsInTextMode``
property to `true`, a person can use a long-press gesture to enable them.
get · iOS 16.0+
automaticTextOnly
TypeScript
get automaticTextOnly(): Promise<ImageAnalysisInteraction_InteractionTypes>
Swift declaration
static let automaticTextOnly: ImageAnalysisInteraction.InteractionTypes
An option that enables all interaction types except image subjects and Visual Look Up.
This option represents the ``VisionKit/ImageAnalysisInteraction/InteractionTypes/automatic`` type, but excludes the ``VisionKit/ImageAnalysisInteraction/InteractionTypes/imageSubject`` and ``VisionKit/ImageAnalysisInteraction/InteractionTypes/visualLookUp`` types.
get automatic(): Promise<ImageAnalysisInteraction_InteractionTypes>
Swift declaration
static let automatic: ImageAnalysisInteraction.InteractionTypes
An option that enables interaction with any type of text, symbols, or subjects that the framework recognizes.
People can select text to perform actions, and after tapping the
Live Text button, they can interact with data detectors. If the
``ImageAnalysisInteraction/allowLongPressForDataDetectorsInTextMode``
property is `true`, a person can touch and hold text to activate data detectors without tapping the Live Text button.