How to disable delete in editing mode and not have table view cells inset when using UITableViewStyleGrouped?
I am working on my first programming project with no prior programming experience, so please bear with me if I don't have all of the proper terminology nailed down yet. I'll try to describe the problem as best as I can.
Let's say I have a table view for displaying the details of a contact, which has fields for name, phone, and email. I would like for these fields to each have a disclosure indicator but no delete control in editing mode. (The user may delete the contents of the field, but shouldn't be presented with the option to delete the cell itself.)
Implementing tableView:editingStyleForRowAtIndexPath: and returning UITableViewCellEditingStyleNone disables the delete control, as desired, but also insets the table view cells when using UITableViewStyleGrouped (an empty space where the delete control would have been).
The insets would be fine if I had delete controls for others fields, but that's not the case. How do I disable the delete control and not have the table view cells inset when using UITableViewStyleGrouped?
Check the tableView:shouldIndentWhileEditingRowAtIndexPath: delegate method.