Adds multiple items to the end of the menu.
- macOS 10.0+
An array of
NSStringobjects containing the titles of the items you want to add. Each string in the array should be unique. If an item with the same title already exists in the menu, the existing item is removed and the new one is added.
If you want to move an item, it’s better to invoke
remove explicitly and then send this method. After adding the items, this method uses the
synchronize method to make sure the item being displayed matches the currently selected item.
Since this method searches for duplicate items, it should not be used if you are adding items to an already populated menu with more than a few hundred items. Add items directly to the receiver's menu instead.