Tutorial by Examples

Manually enabling menu items To manually control the enabled state of a menu items the menu that contains it must disable automatic enabling of its items Menus can turn off automatic enabling in one of two ways: In the Interface Builder In code menu.autoenablesItems = false Both of t...
Menus act like all standard control items. They have an action which is the function to be called and a target which is the object to send the function to. If the target is set to an object then when a user selects a menu item it the action method will be sent to the target object. If the menu item ...
// add an item to a menu menu.addItem(item) // remove and item from a menu menu.removeItem(item)

Page 1 of 1