Instance Method

listTemplate(_:didSelect:completionHandler:)

Tells the delegate that the user selected a list item.

Required.

Declaration

func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPListItem, completionHandler: @escaping () -> Void)

Parameters

listTemplate

The list template containing the selected item.

item

The item selected by the user.

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.