setBaseWritingDirection(_:range:)
Sets the base writing direction of a range of text.
Declaration
func setBaseWritingDirection(_ writingDirection: NSWritingDirection, range: NSRange)Parameters
- writingDirection:
The new writing direction for the text in
range. - range:
The range of text that will have the new writing direction.
Discussion
Invoke this method to change the base writing direction from left-to-right to right-to-left for languages like Hebrew and Arabic, for example.
This method does not include undo support by default. Clients must invoke shouldChangeText(inRanges:replacementStrings:) or shouldChangeText(in:replacementString:) to include this method in an undoable action.
See Also
Setting behavioral attributes
allowsUndoisEditableisSelectableisFieldEditorisRichTextimportsGraphicsdefaultParagraphStyleoutline(_:)allowsImageEditingisAutomaticQuoteSubstitutionEnabledtoggleAutomaticQuoteSubstitution(_:)isAutomaticLinkDetectionEnabledtoggleAutomaticLinkDetection(_:)displaysLinkToolTipsisAutomaticTextCompletionEnabled