简体   繁体   中英

How to customize the Delete button shown when swipe a UITableViewCell

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. 在此处输入图片说明

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM