preferredEdge
The edge of the cell from which the menu should pop out when screen conditions are restrictive.
Declaration
var preferredEdge: NSRectEdge { get set }Discussion
At display time, if attaching the menu to the preferred edge would cause part of the menu to be obscured, the pop-up button may use a different edge. If no preferred edge is set, the pop-up button uses the bottom edge by default, which is NSMaxYEdge for flipped views or NSMinYEdge for unflipped views. Additional values for this property include NSMinXEdge and NSMaxXEdge.
The exact location of the arrow is determined by examining the value of this property and arrowPosition.
If the arrow position is NSPopUpButton.ArrowPosition.arrowAtCenter, the arrow stays in the center of the button and the value of this property determines which edge the arrow points to:
NSMinXEdgepoints to the left,NSMaxYEdgepoints to the top,NSMaxXEdgepoints to the right, andNSMinYEdgepoints to the bottom.If the arrow position is NSPopUpButton.ArrowPosition.arrowAtBottom, the value of this property determines which edge at which the arrow is placed:
NSMinXEdgeplaces the arrow at the center of the left side, pointing to the left,NSMinYEdgeplaces the arrow at bottom right corner, pointing up,NSMaxXEdgeplaces the arrow at the center of the right side, pointing to the right, andNSMaxYEdgeplaces the arrow at the bottom right corner, pointing down.