shouldReplace(foundTextRange:document:withText:)
Determines whether the searchable object allows replacement of the text range you provide.
Declaration
func shouldReplace(foundTextRange: UITextRange, document: Self.DocumentIdentifier?, withText: String) -> BoolParameters
- foundTextRange:
The range of characters in a text container to consider a replacement for.
- document:
A string that uniquely identifies the document containing the text range.
- withText:
The string to replace the text with.
Return Value
Return No to prevent the replacement of a particular text range.
Discussion
Returning NO from this method disables the “replace” button in the find panel. If you don’t implement this method, the system assumes all results are replacable.