BETextInput
A protocol for asynchronous text views that integrate with the text system.
Declaration
protocol BETextInput : BEResponderEditActions, BETextSelectionDirectionNavigation, UIKeyInputMentioned in
Overview
Adopt this protocol in a text field to perform asynchronous actions and provide information to the text system. For example, you can make an XPC request to a web content extension. See Integrating custom browser text views with UIKit.
Topics
Managing the text input view
Managing selection
selectedTextselectedTextRangeisSelectionAtDocumentStartselectPosition(at:completionHandler:)selectPosition(at:for:completionHandler:)adjustSelection(by:completionHandler:)updateCurrentSelection(to:from:in:)
Managing selection views
Managing marked text
Inserting and replacing text
Deleting text
Adjusting text
Requesting context
requestDocumentContext(_:completionHandler:)requestTextContextForAutocorrection(completionHandler:)requestTextRects(for:withCompletionHandler:)
Managing placeholders
Managing text traits
Responding to keyboard input
Responding to dictation
Managing the edit menu
Styling text
Instance Properties
asyncInputDelegateattributedMarkedTextautomaticallyPresentEditMenuisReplaceAllowedmarkedTexttextFirstRecttextLastRect
Instance Methods
adjustSelectionBoundary(to:touchPhase:baseIsStart:flags:)alternativesForSelectedText()autoscroll(to:)cancelAutoscroll()caretRect(for:)handleKeyEntry(_:completionHandler:)keyboardWillDismiss()move(byOffset:)moveSelection(atBoundary:in:completionHandler:)offset(from:to:)remove(_:willInsertText:completionHandler:)removeTextAlternatives()replaceText(_:withText:options:completionHandler:)requestPreferredArrowDirectionForEditMenu(completionHandler:)selectText(in:at:completionHandler:)selectionRects(for:)setAttributedMarkedText(_:selectedRange:)setBaseWritingDirection(_:for:)setMarkedText(_:selectedRange:)setSelection(from:to:gesture:state:)systemWillDismissEditMenu(withAnimator:)systemWillPresentEditMenu(withAnimator:)text(in:)textInteractionGesture(_:shouldBeginAt:)updateSelection(extent:boundary:completionHandler:)willInsertFinalDictationResult()