
在代理方法中實(shí)現(xiàn)下面三個(gè)方面即可
- (BOOL)tableView:(UITableView *)tableView shouldShowMenuForRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
- (BOOL)tableView:(UITableView *)tableView canPerformAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
return YES;
}
- (void)tableView:(UITableView *)tableView performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
[UIPasteboard generalPasteboard].string = cell.textLabel.text;
}

結(jié)束。。。