searchTemplate(_:updatedSearchText:completionHandler:)
Tells the delegate that the user updated the search criteria text.
Declaration
func searchTemplate(_ searchTemplate: CPSearchTemplate, updatedSearchText searchText: String, completionHandler: @escaping ([CPListItem]) -> Void)func searchTemplate(_ searchTemplate: CPSearchTemplate, updatedSearchText searchText: String) async -> [CPListItem]Parameters
- searchTemplate:
The current search template.
- searchText:
The search criteria text entered by the user.
- completionHandler:
The block your implementation calls after retrieving the search result.
- searchResults
An array of Cplistitem objects—one list item for each search result item.
Discussion
After the method retrieves the search result, the method must call completionHandler for the system to display the result to the user.