performSingleReplacement(query:replacementString:options:)
Replaces a single instance of the query string with the replacement string you provide.
Declaration
func performSingleReplacement(query searchQuery: String, replacementString: String, options: UITextSearchOptions?)Parameters
- searchQuery:
The string to search for and replace, the user provides through the search text field of the system find panel.
- replacementString:
The replacement string, the user provides through the replace text field of the system find panel.
- options:
The object containing all the configurable options for the search.
Discussion
The system calls this method when the user initiates the replacement the text for a single match of a string in your app’s text content with the replacement string.