UIMenuController *menuController = [UIMenuController sharedMenuController];
UIMenuItem *menuItem_1 = [[UIMenuItem alloc] initWithTitle:@"复制"
action:@selector()];//@selector()括号中为该按钮触发的方法,该方法必须在UIVIewContrller中进行声
明,就是投向的view所绑定的viewController类中必须实现这个方法
UIMenuItem *menuItem_2 = [[UIMenuItem alloc] initWithTitle:@"删除" action:@selector()];
UIMenuItem *menuItem_3 = [[UIMenuItem alloc] initWithTitle:@"移动" action:@selector()];
menuController.menuItems = [NSArray arrayWithObjects: menuItem_1, menuItem_2,menuItem_3,nil];
[menuItem_1 release];
[menuItem_2 release];
[menuItem_3 release];
[menuController setTargetRect:CGRectMake(touchpos_x, touchpos_y,
50, 50) inView:self.view];//touchpos_x, touchpos_y分别为长按那点的x和y坐标
self.view为将要展示弹出框的视图
[menuController setMenuVisible:YES animated:YES];
主要显示pdf文件长按文字会出现,什么分享,删除之类的框框