Archive for July, 2011
IOS Quick Tips: Adding your own action to the copy/paste menu
0 Comments Published July 18th, 2011 in UncategorizedAdding your own action to the copy/paste menu that is displayed when you touch down inside any editable control is pretty easy. Just add the code below to the viewDidLoad method inside your view controller. UIMenuItem *menuItem = [[UIMenuItem alloc] initWithTitle:@"Add picture" action:@selector(addPicture:)]; [[UIMenuController sharedMenuController] setMenuItems:[NSArray arrayWithObject:menuItem]]; [menuItem release];
Recent Comments