speechAlwaysIncludesPunctuation
Sets whether VoiceOver should always speak all punctuation in the text view.
Text ModifieriOS 15.0+macOS 12.0+tvOS 15.0+watchOS 8.0+speechAlwaysIncludesPunctuation(_:) in SwiftUI
Declaration
compose().speechAlwaysIncludesPunctuation(value?: boolean)func speechAlwaysIncludesPunctuation(_ value: Bool = true) -> TextParameters
valuebooleanA Boolean value that you set to
trueif VoiceOver should speak all punctuation in the text. Defaults totrue.
Discussion
Use this modifier to control whether the system speaks punctuation characters in the text. You might use this for code or other text where the punctuation is relevant, or where you want VoiceOver to speak a verbatim transcription of the text you provide. For example, given the text:
Text("All the world's a stage, " +
"And all the men and women merely players;")
.speechAlwaysIncludesPunctuation()VoiceOver would speak "All the world apostrophe s a stage comma and all the men and women merely players semicolon".
By default, VoiceOver voices punctuation based on surrounding context.
See also
More in Text modifiers.
- accessibilityHeadingSets the accessibility level of this heading.
- accessibilityLabelAdds a label to the view that describes its contents.
- accessibilityTextContentTypeSets an accessibility text content type.
- baselineOffsetSets the vertical offset for the text relative to its baseline.
- boldApplies a bold font weight to the text.
- fontSets the default font for text in the view.
- fontDesignSets the font design of the text.
- fontWeightSets the font weight of the text.
- fontWidthSets the font width of the text.
- foregroundStyleSets the style of the text displayed by this view.
- italicApplies italics to the text.
- kerningSets the spacing, or kerning, between characters.