adjustedRange(from:forEditingTextSelection:)
A method you implement if the location backing store requires manual adjustment after editing.
Declaration
optional func adjustedRange(from textRange: NSTextRange, forEditingTextSelection: Bool) -> NSTextRange?Parameters
- textRange:
An Nstextrange that the method adjusts.
- forEditingTextSelection:
A Boolean value that indicates if
textRangeis for the text selection associated with the edit session.
Return Value
When textRange is intersecting or following the current edited range, the method returns the range adjusted for the modification in the editing session. Returns nil, when no adjustment necessary.