The singleton UIMenuController instance presents the menu interface for the Cut, Copy, Paste, Select, Select All, and Delete commands. This menu is referred to as the editing menu. When you make this menu visible, UIMenuController positions it relative to a target rectangle on the screen; this rectangle usually defines a selection. The menu appears above the target rectangle or, if there is not enough space for it, below it.
The singleton UIMenuController
instance presents an Editing Menu. You can create an instance like this
UIMenuController *menuController = [UIMenuController sharedMenuController];
You can position it relative to a target rectangle on the screen which usually defines a selection.
An example implementation of UIMenuController (assuming you are coding for at least iOS 3.2 (ios)):
UIMenuController *menuController = [UIMenuController sharedMenuController];
UIMenuItem *menuItem = [[UIMenuItem alloc] initWithTitle:@"title" action:@selector(aMethod:)];
UIMenuItem *menuItem1 = [[UIMenuItem alloc] initWithTitle:@"title" action:@selector(anotherMethod:)];
[menuController setMenuItems:[NSArray arrayWithObjects:menuItem, menuItem1, nil]];
[menuController setTargetRect:CGRectMake(location.x, location.y, 0, 0) inView: someView];
[menuController setMenuVisible:YES animated:YES];
menuController.arrowDirection= UIMenuControllerArrowLeft;
[resetMenuItem release];