4

I have a uitableview and when I press the edit button associated with it I do not want to have the cells indent but I still want the add/delete buttons to be inserted. When I have tableView:shouldIndentWhileEditingRowAtIndexPath return NO the cells still indent unless I have editingStyleForRowAtIndexPath return UITableViewCellEditingStyleNone. What is the easiest way to go about this? Thanks

2 Answers 2

3

I was watching "Session 432 - Mastering iPhone Table Views" from the Apple Developer - iPhone Development Foundation Videos session and at about 5:15 into it, they talk about

-(BOOL)tableView:(UITableView*)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath*)indexPath;

They even have images with the red deletable icon on the left (they appear inside the cell).

Unless they changed this in recent iOS releases, this should work.

I do want to thank you for mentioning tableView:shouldIndentWhileEditingRowAtIndexPath because it solved a problem I was having! :)

jorj

1
  • Unfortunately this doesn't work for me without changing the editingStyle to none. I should mention this is for a regular non-grouped table.
    – Adam S.
    Apr 11, 2011 at 17:33
0

I haven't found a solution, but I can explain why tableView:shouldIndentWhileEditingRowAtIndexPath: isn't working. According to the comments on it:

// This method only applies to grouped style table views.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.