<!--
{
  "availability" : [
    "iOS: 8.0.0 - 11.0.0",
    "iPadOS: 8.0.0 - 11.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentMenuViewController/addOption(withTitle:image:order:handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocumentMenuViewController(im)addOptionWithTitle:image:order:handler:"
  },
  "title" : "addOption(withTitle:image:order:handler:)"
}
-->

# addOption(withTitle:image:order:handler:)

Adds a custom menu item to the list of document pickers.

```
func addOption(withTitle title: String, image: UIImage?, order: UIDocumentMenuOrder, handler: @escaping () -> Void)
```

## Parameters

`title`

The custom menu item’s title.

`image`

The custom menu item’s image.

`order`

The position of this menu item. See [`UIDocumentMenuOrder`](/documentation/UIKit/UIDocumentMenuOrder) for possible values.

`handler`

A block that is called when the user selects this custom menu item.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)