Add custom document browser actions, activities, and bar items.
There are three different ways to add custom actions to the document browser:
Add document browser actions to the navigation bar or Edit Menu.
Add activities to the activity view.
Add bar items to the navigation bar.
Add Document Browser Actions
By default, the system provides a number of standard actions (copy, move, rename, delete, and share). To add custom actions, assign an array of
UIDocument objects to the browser's
Document browser actions can be accessed in two ways:
Navigation bar actions appear in the navigation bar when the user places the browser into the Select mode.
Edit Menu actions appear when the user long presses on a document or folder.
When triggered, these actions are passed the URLs of the currently selected items.
The browser displays an activity view when the user taps the Share button (for example, when the user long presses on a document or folder and selects Share from the Edit Menu).
To add custom activities to the activity view, implement your
document method and return an array of custom
Your delegate object is passed an array of URLs for the currently selected items. You can store and use these URLs in your
For more information, see Sharing and Actions.
Add Bar Button Items
Actions triggered by these buttons don't have access to the browser's content or to the URLs of selected items. Use bar button items for global actions only (actions that don't affect a specific document or folder).