Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 覆盖默认的tableview设置编辑行为_Iphone_Ios_Objective C_Uitableview - Fatal编程技术网

Iphone 覆盖默认的tableview设置编辑行为

Iphone 覆盖默认的tableview设置编辑行为,iphone,ios,objective-c,uitableview,Iphone,Ios,Objective C,Uitableview,我目前已经为我的表视图实现了setEditing/committeediting方法,它现在在滑动单元格时显示“delete”按钮 只是想知道是否有任何方法可以将此按钮上的文本从“删除”更改为其他内容,以便我可以使用“提交”方法执行自定义行为,例如更新某些设置 谢谢您可以使用UITableViewDelegate方法指定删除按钮标题: - (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButton

我目前已经为我的表视图实现了setEditing/committeediting方法,它现在在滑动单元格时显示“delete”按钮

只是想知道是否有任何方法可以将此按钮上的文本从“删除”更改为其他内容,以便我可以使用“提交”方法执行自定义行为,例如更新某些设置


谢谢

您可以使用UITableViewDelegate方法指定删除按钮标题:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath

可以使用UITableViewDelegate方法指定删除按钮标题:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath