Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
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?
-
The built in
ui.TableView
supports only one action per row, but you can use theobjc_util
module to create a customUITableView
and 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.
-
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.