One Logo Pool Ball
Vision · IOS API REFERENCE

DocumentObservation.Container.Text

struct · iOS 26.0+ · SDK 27.1

struct Text

A structure that represents a region of text in a document.

Members (7)

get · iOS 26.0+

transcript

TypeScript
get transcript(): string
Swift declaration
var transcript: String { get }

The complete text as a string.

get · iOS 26.0+

detectedData

TypeScript
get detectedData(): Array<DocumentObservation_Container_DataDetectorMatch>
Swift declaration
var detectedData: [DocumentObservation.Container.DataDetectorMatch] { get }

Detected content in the document matched to a specific type of data, such as emails, phone numbers, addresses, and so on. This is a computed property that may be computationally expensive for large text regions.

get · iOS 26.0+

textAlignment

TypeScript
get textAlignment(): (DocumentObservation_Container_Text_Alignment) | null
Swift declaration
var textAlignment: DocumentObservation.Container.Text.Alignment? { get }

The alignment of the text within its container.

method · iOS 26.0+

boundingRegion

TypeScript
boundingRegionFor(range: SDKHandle): (ContoursObservation_Contour) | null
Swift declaration
func boundingRegion(for range: Range<String.Index>) -> NormalizedRegion?

Calculates a bounding region around the range of characters within a string. - Parameters: - range: An interval for the amount of characters within the text string.

get · iOS 26.0+

boundingRegion

TypeScript
get boundingRegion(): ContoursObservation_Contour
Swift declaration
var boundingRegion: NormalizedRegion { get }

A polygon that defines the boundary of text. - Parameters: - boundingBox: The bounding box of the object.

get · iOS 26.0+

lines

TypeScript
get lines(): Array<RecognizedTextObservation>
Swift declaration
var lines: [RecognizedTextObservation] { get }

The text grouped by line.

get · iOS 26.0+

words

TypeScript
get words(): (Array<RecognizedTextObservation>) | null
Swift declaration
var words: [RecognizedTextObservation]? { get }

An instance property that returns individual words in a text container. Chinese, Japanese, Korean, and Thai don't recognize individual words.

Skipped declarations

No declarations were skipped in this snapshot.

All Vision types →