Contents

DataDetector.Options

A set of options you can use to refine the behavior of text scanning, and better interpret the semantic domain of the matches.

Declaration

struct Options

Overview

These properties are only hints, so it’s best to not make assumptions about how the framework uses them:

  • Set documentDate to the creation date of the scanned string, such as a text message reception date. The default is now.

  • Set documentTimeZone to the time zone matching the documentDate. The default is a person’s current time zone.

  • Set documentLanguageCode to the language code of the scanned string, for example, “en” for English. Only set this property if you know the target language with a high degree of confidence; otherwise, set to nil.

  • Set documentRegion to the region relevant to the scanned string, if any. Only set this property if you know the region with a high degree of confidence; otherwise, set to nil.

Topics

Hints you can provide to add more context for the matching process

Initializers

See Also

Structures