我已经实现了在交换时显示删除按钮的功能,它还通过单击按钮删除了单元格。但我只想将删除按钮的文本从“删除”更改为“取消”
答案 0 :(得分:11)
在UITableViewDelegate
中实施以下内容:
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath {
return @"Cancel";
}
答案 1 :(得分:4)
您可以使用UITableViewDelegate协议方法:
tableView:titleForDeleteConfirmationButtonForRowAtIndexPath: