listTemplate(_:didSelect:completionHandler:)
Tells the delegate when the user selects a list item.
Declaration
func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPListItem, completionHandler: @escaping @Sendable () -> Void)func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPListItem) asyncParameters
- listTemplate:
The list template that contains the selected item.
- item:
The item that the user selects.
- completionHandler:
The block that your app must call after handling the selected item.
Discussion
When implementing this method, perform any necessary operations to prepare for completing the item selection, including updating your user interface. You must call completionHandler after handling the selected item to tell the system that it can continue. The list template displays an activity indicator—after a short delay—while it waits for your implementation to call the completion handler.