---
title: "init(frame:pullsDown:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nspopupbutton/init(frame:pullsdown:)"
---

# init(frame:pullsDown:)

Returns an NSPopUpButton object initialized to the specified dimensions.

## Declaration

```swift
init(frame buttonFrame: NSRect, pullsDown flag: Bool)
```

## Parameters

- `buttonFrame`: The frame rectangle for the button, specified in the parent view’s coordinate system.
- `flag`: doc://com.apple.documentation/documentation/Swift/true if you want the receiver to display a pull-down menu; otherwise, doc://com.apple.documentation/documentation/Swift/false if you want it to display a pop-up menu.

## Return Value

Return Value An initialized NSPopUpButton object, or nil if the object could not be initialized.

## See Also

### Related Documentation

- [init(textCell:pullsDown:)](appkit/nspopupbuttoncell/init(textcell:pullsdown:).md)
- [pullsDown](appkit/nspopupbutton/pullsdown.md)
