<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenu/popUp(positioning:at:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMenu(im)popUpMenuPositioningItem:atLocation:inView:"
  },
  "title" : "popUp(positioning:at:in:)"
}
-->

# popUp(positioning:at:in:)

Pops up the menu at the specified location.

```
func popUp(positioning item: NSMenuItem?, at location: NSPoint, in view: NSView?) -> Bool
```

## Parameters

`item`

The menu item to be positioned at the specified location in the view.

`location`

The location in the `view` coordinate system to display the menu item.

`view`

The view to display the menu item over.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if menu tracking ended because an item was selected, and <doc://com.apple.documentation/documentation/Swift/false> if menu tracking was cancelled for any reason.

## Discussion

Displays the menu as a pop-up menu. The top left corner of the specified item (if specified, `item` must be present in the menu) is positioned at the specified location in the specified view, interpreted in the view’s own coordinate system.

If `item` is `nil`, the menu is positioned such that the top left of the menu content frame is at the given location.

If `view` is `nil`, the location is interpreted in the screen coordinate system. This allows you to pop up a menu disconnected from any window.

---

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)