UIMenuItem Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iOS 3.2 and later. |
| Declared in | UIMenuController.h |
Overview
An instance of the UIMenuItem class represents a custom item in the editing menu managed by the UIMenuController object.
Custom menu items appear in the menu after any validated system items. A UIMenuItem object has two properties: a title and an action selector identifying the method to invoke in the handling responder object. Targets are not specified; a suitable target is found via normal traversal of the responder chain. To have custom menu items appear in the editing menu, you must add them to the menuItems property of the UIMenuController object.
Properties
action
A selector identifying the method of the responder object to invoke for handling of the menu command.
Discussion
The action selector cannot be NULL.
Availability
- Available in iOS 3.2 and later.
Declared In
UIMenuController.htitle
The title of the menu item.
Discussion
The title cannot be nil.
Availability
- Available in iOS 3.2 and later.
Declared In
UIMenuController.hInstance Methods
initWithTitle:action:
Creates and returns a menu-item object initialized with the given title and action.
Parameters
- title
The title of the menu item.
- action
A selector identifying the method of the responder object to invoke for handling the command represented by the menu item.
Return Value
An initialized UIMenuItem object, or nil if there was a problem creating the object.
Availability
- Available in iOS 3.2 and later.
Declared In
UIMenuController.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-02-25)