现在的位置: 首页 > 综合 > 正文

修改UITableView中Delete操作的默认按钮

2014年02月05日 ⁄ 综合 ⁄ 共 362字 ⁄ 字号 评论关闭

以前写过一篇文章:TableView中的Delete操作,通过这篇文章,可以实现删除表视图的某条记录,但默认的删除按钮为Delete,如果想显示为删除的话,则需要实现UITableViewDelegate中的- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath
*)indexPath方法。


- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath{  
    return @"删除";  
}  

抱歉!评论已关闭.