TextTruncationMode
The type of truncation to apply to a line of text when it's too long to fit in the available space.
Declaration
type TextTruncationMode = 'head' | 'middle' | 'tail';enum TruncationModePass a literal, or build one with SwiftUI.TextTruncationMode from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'head'SwiftUI.TextTruncationMode.headTruncate at the beginning of the line.
'middle'SwiftUI.TextTruncationMode.middleTruncate in the middle of the line.
'tail'SwiftUI.TextTruncationMode.tailTruncate at the end of the line.
Overview
When a text view contains more text than it's able to display, the view
might truncate the text and place an ellipsis (...) at the truncation
point. Use the View.truncationMode(_:) modifier with one of the
TruncationMode values to indicate which part of the text to
truncate, either at the beginning, in the middle, or at the end.
From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
See also
More in Text and symbols.
- DisabledTextSelectabilityA selectability type that disables text selection by the person using your app.
- EnabledTextSelectabilityA selectability type that enables text selection by the person using your app.
- FindContextThe status of the find navigator for views which support text editing.
- FixedTextVariantThe default text variant preference that chooses the largest available variant.
- FontAn environment-dependent font.
- FontChainFont with chained calls: SwiftUI.Font.bold(...).
- FontContextInformation used to resolve a font.
- FontDesignA design to use for fonts.
- FontLeadingA line spacing adjustment that you can apply to a font.
- FontWeightA weight to use for fonts.
- FontWidthA width to use for fonts that have multiple widths.
- SubmitLabelA semantic label describing the label of submission within a view hierarchy.