UIMenuItem *share = [[UIMenuItem alloc] initWithTitle:@"分享"action:@selector(shareClick:)]; UIMenuItem *report = [[UIMenuItem alloc] initWithTitle:@"举报"action:@selector(report:)]; UIMenuController *menu = [UIMenuController sharedMenuController]; [menu setMenuItems:[NSArray arrayWithObjects:share, report, nil]]; [menu setTargetRect:cell.c_post_content.frame inView:cell.c_post_content.superview]; [menu setMenuVisible:YES animated:YES];
时间: 2024-11-19 03:36:45