replace(foundTextRange:document:withText:)
Informs the searchable object to replace the text range for the highlighted search result.
Declaration
func replace(foundTextRange: UITextRange, document: Self.DocumentIdentifier?, withText: String)Parameters
- foundTextRange:
The text range to replace.
- document:
A string that uniquely identifies a document when searching multiple documents, or
nilwhen searching a single document. - withText:
The string to replace the text with.
Discussion
When supportsTextReplacement returns YES, the system calls this method during a find session to request a text range to replace.