|Sep 25, 2008, 01:56 PM||#1|
Swipe to delete?
OK. Bonehead question of the day:
I have added a UITableView to a view. I would like to have the "swipe to delete" behavior. Everything I read from Apple indicates it's "just there" on a UITableView. But no so much for me...
I am handling the editingStyleForRowAtIndexPath method and returning UITableViewCellEditingStyleDelete, but that never gets called. My other delegate methods do. I copied the signature directly from the documentation, so I believe it to be correct.
I also implemented the willBeginEditingRowAtIndexPath and didEndEditingRowAtIndexPath methods, which are (obviously) also not called.
I can set the whole table to edit mode and it works fine. But then I have the delete icons all the time. Don't want it. I also don't necessarily want to go with a button to enter and leave "Edit" mode, if I can avoid it.
Any help? Is there something I have to do to the list to get it to respond to the swipe?
|Sep 25, 2008, 02:08 PM||#2|
You have to implement commitEditingStyle to get that behavior.
I wish that was documented somewhere.
I decided to just move on and get the data implementation working. As soon as I added that method, my swipe action worked...
Anyway, there it is, documented so that I will find it next time I search for it...
|Sep 28, 2008, 09:00 AM||#3|
When using this Swipe to Delete mode is it possible to detect this specific edit mode? For example when you are in swipe-delete view the left side of the cell does not need to be adjusted, as the delete circle is not shown.
|Sep 28, 2008, 09:30 AM||#4|
Come on guys, all this stuff is documented in the Table View programming guide:
Enter the text you want to search for, say 'swipe' in the search box at the top of the documentation window. Select 'Apple iPhone OS 2.1' in the Doc Sets Pane. Choose 'Full-Text' in the selection bar at the top left. Then search.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|new gmail app, can anyone swipe to delete?||pixelchild||iPhone and iPod touch Apps||5||Oct 22, 2014 08:48 PM|
|IOS 7.0.4 - Unable to Swipe to Delete in mail app||sedgeman||iOS 7||5||Nov 18, 2013 03:39 PM|
|iOS 7 Mail - How to swipe to delete Gmail messages rather than archive them||bjcskier||iOS 7||6||Sep 21, 2013 07:13 PM|
|iPhone ewon't delete emails when I delete them on my MacBook and I macs.||johnstonimages||iCloud and Apple Services||3||Mar 12, 2013 11:00 PM|
|Remove "Swipe to Delete" on iPod Touch||NicMakesNoise||iPod touch||5||Sep 1, 2012 10:24 AM|
All times are GMT -5. The time now is 05:56 AM.