<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICellAccessory-swift.struct/popUpMenu(_:displayed:options:selectedElementDidChangeHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit15UICellAccessoryV9popUpMenu_9displayed7options31selectedElementDidChangeHandlerACSo6UIMenuC_AC14DisplayedStateOAC03PopeF7OptionsVyAIcSgtFZ"
  },
  "title" : "popUpMenu(_:displayed:options:selectedElementDidChangeHandler:)"
}
-->

# popUpMenu(_:displayed:options:selectedElementDidChangeHandler:)

Creates a popup menu system accessory with the specified menu, display state, configuration options, and optional selection handler.

```
static func popUpMenu(_ menu: UIMenu, displayed: UICellAccessory.DisplayedState = .always, options: UICellAccessory.PopUpMenuOptions = PopUpMenuOptions(), selectedElementDidChangeHandler: UICellAccessory.MenuSelectedElementDidChangeHandler? = nil) -> UICellAccessory
```

## Parameters

`menu`

The menu to display when a user taps the popup menu accessory.

`displayed`

The cell-editing states that the popup menu accessory appears in. This parameter has a default value of [`UICellAccessory.DisplayedState.always`](/documentation/UIKit/UICellAccessory-swift.struct/DisplayedState/always).

`options`

Configuration options for the popup menu accessory. See [`UICellAccessory.PopUpMenuOptions`](/documentation/UIKit/UICellAccessory-swift.struct/PopUpMenuOptions) for possible configuration options.

`selectedElementDidChangeHandler`

An optional closure that the system calls when a user selects an element in the menu.

## Return Value

A configured popup menu cell accessory that appears as a pair of chevrons that point upward and downward. This accessory indicates that tapping anywhere in the cell presents a popup menu. This accessory appears on the trailing edge of the cell.

---

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)