Customize the delete button in UITableView

后端 未结 3 1315
清歌不尽
清歌不尽 2020-12-05 12:41

I have the functionality for \"Swipe to delete\" the TableViewCell. I want to customize the Delete button.

3条回答
  •  眼角桃花
    2020-12-05 12:48

    If you only need to change the title of the button, you only need to add the titleForDeleteConfirmationButtonForRowAtIndexPath method.

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

提交回复
热议问题