Contents

init(identifier:localizedTitle:availability:handler:)

Instantiates and returns a new browser action item.

Declaration

init(identifier: String, localizedTitle: String, availability: UIDocumentBrowserAction.Availability, handler: @escaping ([URL]) -> Void)

Parameters

  • identifier:

    A unique identifier for the activity.

  • localizedTitle:

    The title that appears in the Edit Menu or navigation bar. This title should be a String returned by Nslocalizedstring.

  • availability:

    A value that defines where the action can appear (in the menu, navigation bar, or both).

    For a list of valid values, see Availability Swift.struct.

  • handler:

    A block that is called when the user triggers the action. The block takes the following parameter:

    urls

    An array of URLs for the documents that the user has selected. If the action’s Supportsmultipleitems property is False, this array contains one URL. Otherwise, it can contain one or more URLs.

See Also

Creating and configuring actions