moveSelection(atBoundary:in:completionHandler:)
Moves the text-selection caret relative to the current position.
Declaration
func moveSelection(atBoundary granularity: UITextGranularity, in direction: UITextStorageDirection, completionHandler: @escaping @Sendable () -> Void)func moveSelection(atBoundary granularity: UITextGranularity, in direction: UITextStorageDirection) asyncParameters
- granularity:
The amount by which to move the caret.
- direction:
The direction in which to move the caret, relative to the base writing direction.
- completionHandler:
A block you call when your text view has handled the gesture.
Mentioned in
Discussion
If you return false from textInteractionGesture(_:shouldBeginAt:) for the gesture that moves the caret, then the text system doesn’t call this method.