在tableviewcontroller的编辑模式下重命名"删除"按钮

Abh*_*nav 10 iphone cocoa-touch uitableview

将表格视图置于编辑模式时,我们可以重命名"删除"按钮吗?

ama*_*ttn 17

UITableView委托必须实现:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
Run Code Online (Sandbox Code Playgroud)


Ale*_*nte 5

实行

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
Run Code Online (Sandbox Code Playgroud)

并返回您的自定义标题以进行删除.

来自UITableViewDelegate文档