开发者

how to change the text of delete button in a UITableCell on swap event

开发者 https://www.devze.com 2023-03-06 19:04 出处:网络
i have implemented the functionality to make delete button visible on swap and it also delets the cell by clicking开发者_如何学Python on the button. but i just want to change the text of delete button

i have implemented the functionality to make delete button visible on swap and it also delets the cell by clicking开发者_如何学Python on the button. but i just want to change the text of delete button from "DELETE" to "CANCEL"


Implement the following in your UITableViewDelegate:

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


You can use the UITableViewDelegate protocol method:

tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:

0

精彩评论

暂无评论...
验证码 换一张
取 消