---
title: "popUp(positioning:at:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsmenu/popup(positioning:at:in:)"
---

# popUp(positioning:at:in:)

Pops up the menu at the specified location.

## Declaration

```swift
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

Return Value true if menu tracking ended because an item was selected, and false if menu tracking was cancelled for any reason.

## Discussion

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.

## See Also

### Displaying Context-Sensitive Help

- [popUpContextMenu(_:with:for:)](appkit/nsmenu/popupcontextmenu(_:with:for:).md)
- [popUpContextMenu(_:with:for:with:)](appkit/nsmenu/popupcontextmenu(_:with:for:with:).md)
- [helpRequested(with:)](appkit/nsmenu/helprequested(with:).md)
