Contents

FPUIActionExtensionViewController

The custom user interface used to perform a selected action.

Declaration

class FPUIActionExtensionViewController

Mentioned in

Overview

Subclass this view controller to provide the user interface for your actions.

No matter how many actions you define, your File Provider UI extension has only one FPUIActionExtensionViewController subclass. When the user selects one of your actions, the system instantiates a copy of your subclass, calls its prepare(forAction:itemIdentifiers:) method, and presents it to the user.

Your subclass must do the following:

  • Override the prepare(forAction:itemIdentifiers:) method to check the action identifiers and present an appropriate user interface for the selected actions.

  • Provide some sort of feedback, even if the action doesn’t require interaction with the user. For example, present a view that quickly fades out and automatically completes the action.

  • Call the extensionContext object’s cancelRequest(withError:) or completeRequest() method when the action is finished to complete the action.

Topics

Working with Actions

See Also

Document Browser Customization