windowScene(_:performActionFor:completionHandler:)
Asks the delegate to perform the user-selected action.
Declaration
optional func windowScene(_ windowScene: UIWindowScene, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void)optional func windowScene(_ windowScene: UIWindowScene, performActionFor shortcutItem: UIApplicationShortcutItem) async -> BoolParameters
- windowScene:
The window scene object receiving the shortcut item.
- shortcutItem:
The action selected by the user. Your app defines the actions that it supports, and the user chooses from among those actions. For information about how to create and configure shortcut items for your app, see Uiapplicationshortcutitem.
- completionHandler:
A handler block to call after you complete the action. This block has no return value and takes the following parameter:
Discussion
When the user selects one of your app’s shortcut items, use this method to perform the selected action. After you finish the action, execute the specified completionHandler block to report your success or failure in performing the action.