Im talking about the menu that shows up when you select a block of text it gives you the option to cut/paste/copy. I figured out how to add one more option to the menu, but
I assume your talking about UIMenuController. If you don't want to see Copy/Paste/Cut/Delete/Select/SelectAll you will need to add the following code to your UITextField's or UITextView's delegate:
- (BOOL)canPerformAction: (SEL)action withSender: (id)sender {
BOOL answer = NO;
if (action == @selector(item1)) {
answer = YES;
}
if (action == @selector(item2)) {
answer = YES;
}
return answer;
}
Where item1 and item2 are the names of the objects in UIMenuController.menuItems.
In my experience if you are using a UITextView the Copy, Paste, Cut and Select All menu items will remain, in this case add the following code to a subclass of UITextView.
- (BOOL) canPerformAction:(SEL)action withSender:(id)sender {
if (action == @selector(cut:) || action == @selector(copy:) || action == @selector(paste:) || action == @selector(selectAll:)) {
return YES;
}
}