How to customize the Delete button shown when swipe a UITableViewCell

核能气质少年 提交于 2019-12-11 20:54:58

问题


I have a table view and enabled the swipe to delete feature by providing an empty implementation of - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath of the table view controller. I can see a red 'Delete' button when I swipe left the table cells. But the button's label is 'Delete' despite that the system locale is not English. I have too problems. 1. I want the Delete button to be localized according to the locale. 2. I want to add some other button, like that in the Podcast app of Apple.


回答1:


there is too much solutions... you should to search before posting new question. check this link:

iOS Programming 101: How To Create Swipeable Table View Cell to Display More Options

or use ready-made solutions like this:

https://github.com/CEWendel/SWTableViewCell

i can't post much links without 10 reputation, so try to google "custom delete button uitableviewcell"



来源:https://stackoverflow.com/questions/25698054/how-to-customize-the-delete-button-shown-when-swipe-a-uitableviewcell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!