Ios 如何更改tableviewcell删除确认按钮的提示字符串
当我想删除一个单元格时,我只想更改Ios 如何更改tableviewcell删除确认按钮的提示字符串,ios,objective-c,swift,Ios,Objective C,Swift,当我想删除一个单元格时,我只想更改TableViewCell的确认按钮标题,但在引用中找不到任何相关属性。 我只想把标题从删除改为垃圾,有人知道怎么做吗 重写UITableViewDelegate的现有方法 -(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath { return @"trash";
TableViewCell
的确认按钮标题,但在引用中找不到任何相关属性。
我只想把标题从删除改为垃圾,有人知道怎么做吗 重写UITableViewDelegate的现有方法
-(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath {
return @"trash";
}
目标-C
-(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath {
return @"Trash";
}
Swift
func tableView(tableView: UITableView, titleForDeleteConfirmationButtonForRowAtIndexPath indexPath:NSIndexPath) -> String
{
return "Trash";
}
希望这对您有所帮助谢谢,现在我知道我应该在UITableViewDelegate中找到文档,而不是在table视图中。是的,它只是忘了键入