Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Deleting a row without implementing tableView:commitEditingStyle:forRowAtIn

The documentation says "To enable the swipe-to-delete feature of table views (wherein a user swipes horizontally across a row to display a Delete button), you must implement the tableView:commitEditingStyle:forRowAtIndexPath: method."

I have a UISwitch in the cell's accessory view and the delete selector is invoked when I swipe over the UISwitch control. So, I don't want to implement the swipe-to-delete feature. I want the user to delete the row by clicking the edit and the delete button.

Is there a way to delete items from a table view without implementing tableView:commitEditingStyle:forRowAtIndexPath?

iPhone, iOS 4

Posted on Jan 15, 2011 7:45 PM

Reply
2 replies

Jan 16, 2011 8:40 AM in response to xnav

if I don't implement "tableView:commitEditingStyle:forRowAtIndexPath" then I would need my own UI for showing the delete buttons, correct? I was hoping to use the default Apple buttons to do this.

I have decided to remove the UISwitch from the accessory view of the cell and move it in the detail view. This way I can delete the default way.

Deleting a row without implementing tableView:commitEditingStyle:forRowAtIn

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.