adjustedRange(from:forEditingTextSelection:)
Returns the text range, if any, in the backing store that required manual adjustment after editing.
Declaration
func adjustedRange(from textRange: NSTextRange, forEditingTextSelection: Bool) -> NSTextRange?Parameters
- textRange:
The text range.
- forEditingTextSelection:
A Boolean value that indicates if
textRangeis for the text selection associated with the edit session.
Return Value
The adjusted TextRange for the editing session, or nil of no adjustment was necessary
Discussion
When textRange is intersecting or following the current edited range, the method returns an adjusted range for the modification in the editing session.