swipe to delete when already in edit mode

swipe to delete when already in edit mode

I have an iphone app using a uitableview where I'd like the "reorder" controls to always be displayed, and have the user swipe to delete rows.

The approach I'm currently taking is to put the tableview in edit mode and allow selection in edit mode

self.tableView.editing = YES; self.tableView.allowsSelectionDuringEditing = YES; 

I then hide the red delete circles using

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {     return UITableViewCellEditingStyleNone; }  - (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath {     return NO; } 

I cant figure out how to get the swipe gesture to bring up the "delete" on the right side when the tableview is already in edit mode, can somebody point me in the right direction?

alternatively, if someone knows how to get the cell reordering controls to show when NOT in edit mode, that would also be a workable solution


iphone mail won't display javascript in attached html files?


iPhone web app development in ASP.NET - where to begin?
When the user swipes on a given row, you need to store a reference somewhere so that you can change the value returned by editingStyleForRowAtIndexPath and shouldIndentWhileEditingRowAtIndexPath.

Accessing Google APIs from iPhone native app
Your best bet is likely to use indexPathForCell on the cell that is swiped and store that.

Pre-setting uislider values
Then in the two display methods above you need to check if the NSIndexPath is the same or not (I'm not sure if they will be the same pointer or if you'll need to compare the section/row values - testing required).

Connection reset by peer with iPhone NSURLConnection
If they match, display the delete button..
Finding exception in Objective c code
Note that you may need to call reloadData on your tableView to have the effect appear without scrolling away and back again..
iphone keypad 'go' won't work jquery submit

How can I add a boolean value to a NSDictionary?


I'm wondering if the way you're headed now would break the Human Interface guidelines, which would result in the app not getting approved.. I can't see why you can't capture the swipe gesture and then use that to 'unhide' the red delete (stop sign) icons for the delete confirmation?.

60 out of 100 based on 35 user ratings 860 reviews