Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create custom delete button for uitableview

Im working on an ios app and my question is how to change the default button on swipe to delete on a uitableview. i see i can change the text with titleForDeleteConfirmationButtonForRowAtIndexPath but i want to change the image completely. ive been looking around for a way and all the posts about it may be out of date so just want to confirm with people before i go ahead with this. What im going to do is add a gesture recogniser to the cells themselves to catch the users swipe on individual cells and then add in my custom button and re arrange the cell frame from there and just forget about apples default swipe to delete completely. how that sound?

like image 248
glogic Avatar asked Dec 22 '11 11:12

glogic


1 Answers

Here is a great open-source class for doing exactly this, based on the behavior of the Twitter app:

https://github.com/thermogl/TISwipeableTableView

like image 96
Hiren Avatar answered Nov 07 '22 21:11

Hiren