TableView Swipe Row for More Buttons
I already know how to create a TableView that allows swiping on a row to reveal the Delete button. So...
How would I make it so that two buttons are revealed after swiping on a row?
lukaskollmer last edited by
The built in
ui.TableViewsupports only one action per row, but you can use the
objc_utilmodule to create a custom
UITableViewand implement the
-[UITableViewDelegate tableView:editActionsForRowAtIndexPath:method which returns an array of table view row actions.
An other option for multiple actions per row would be to simply add an info accessory button to each row and show an alert w/ more options when the accessory button is pressed
Ah, so I may have to learn a little Objective C then. I was hoping to avoid that, but it's good to know my options. Also, I like the accessory button technique you mentioned. Thank you, lukaskollmer.
JonB last edited by
I should also be possible to create a custom View class that goes into the content_view of your cell. you could implement swipe actions there, or for instance, a scrollview that shows some buttons.
i may have an example somewhere...
If you have an example, that would be most welcome, JonB.