NSMenu Class
The NSMenu Class is the basis for all Cocoa menus. It manages a collection of NSMenuItem instances. It also handles the management of a borderless window used to display the menu. Because the NSMenu object acts as a collection containing several menu items, most of its methods are for manipulating a list of menu items. Aside from variations in the names, these methods are very similar to the methods defined by NSMutableArray.
NOTE
Because both the NSMenu and the NSMenuItem classes are nearly always used together, this section explains the NSMenu methods but does not provide specific code examples. Instead, the “NSMenuItem Class” section later in this chapter provides example code showing how both classes are used. You need to first ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access