textPasteConfigurationSupporting(_:performPasteOf:to:)
Asks the delegate to explicitly handle the final incorporation of a pasted or dropped string of text into the text view.
Declaration
optional func textPasteConfigurationSupporting(_ textPasteConfigurationSupporting: any UITextPasteConfigurationSupporting, performPasteOf attributedString: NSAttributedString, to textRange: UITextRange) -> UITextRangeReturn Value
A text range representing the position of the text added to the text view.
Discussion
You implement this method when you want to handle pasting the final attributed string into the text view. If you don’t implement this method, the standard paste mechanism is used. When adding the attributed string to the text view, be sure to place the text at the provided text range. Placing the string elsewhere in the text view may confuse the user.