我目前已经为我的 TableView 实现了 setEditing/commitEditing 方法,它现在在滑动单元格时显示“删除”按钮。
只是想知道是否有任何方法可以将此按钮上的文本从“删除”更改为其他内容,以便我可以使用“commitEditing”方法执行自定义行为,例如更新某些设置?
谢谢
最佳答案
您可以使用 UITableViewDelegate 方法指定删除按钮标题:
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
关于iphone - 覆盖默认的 tableview setEditing 行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17695811/