Contents

NSMenu.PresentationStyle.palette

A menu presentation style where items to display align horizontally.

Declaration

case palette

Discussion

You can turn any menu into a palette menu by setting the menu’s presentation style to .palette. For each menu item, set its image. For template images, AppKit automatically adds the appropriate selection tint. Alternatively you can set the offStateImage and the onStateImage. Use the onStateImage to indicate selection.

The following example creates a presentation style menu that displays a list of sport images. When a menu item selects, the system automatically tints the image.

[Image]

See Also

Defining the menu style