How to stop the table view from indenting while editing while still having add / remove buttons?

I have a uitableview, and when I click on the edit button associated with it, I don't want to have cell indentation, but I still want the add / remove buttons to be inserted. When I have tableView: shouldIndentWhileEditingRowAtIndexPath returns NO, the cells still are indented if I don't have editStyleForRowAtIndexPath return UITableViewCellEditingStyleNone . What is the easiest way? Thanks

+4
source share
2 answers

I watched "Session 432 - Mastering the iPhone Table Views" from the Apple Developer - iPhone Development Foundation video session and around 5:15 in it, they talk about

- (BOOL) tableView: (UITableView *) tableView should be:

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

If they have not changed this in recent releases of iOS, this should work.

I want to thank you for mentioning tableView: shouldIndentWhileEditingRowAtIndexPath, because it solved the problem I encountered! :)

Jorj

+3
source

I did not find a solution, but I can explain why tableView:shouldIndentWhileEditingRowAtIndexPath: does not work. According to comments on this:

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

Source: https://habr.com/ru/post/1340630/


All Articles