<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPopUpButton/init(popUpMenu:target:action:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "s:So13NSPopUpButtonC6AppKitE03popB4Menu6target6actionABSo6NSMenuC_yXlSg10ObjectiveC8SelectorVSgtcfc"
  },
  "title" : "init(popUpMenu:target:action:)"
}
-->

# init(popUpMenu:target:action:)

Creates a standard pop-up button with a menu, target, and action.

```
@backDeployed(before: macOS 15.0)
@MainActor @preconcurrency convenience init(popUpMenu: NSMenu, target: AnyObject?, action: Selector?)
```

## Parameters

`popUpMenu`

A menu presented by the pop-up button, containing items that the user can choose between.

`target`

The target object that receives action messages from the control.

`action`

The action message sent by the control.

## Return Value

An initialized pop-up button object.

## Discussion

If `menu` is non-empty, the pop-up button uses the first item for its initial selection.

---

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)