Get frame for UITableView section

How to get the frame of a whole section in a grouped table view?

I want to highlight the section when editing, setting the boundaries of the table view in this frame.

+4
source share
2 answers

You will get a rectangle for the section using the UITableView method -(CGRect)rectForSection:(NSInteger)section; .

+15
source

You may want to deleteSections:withRowAnimation: when the table goes into edit mode and insertSections:withRowAnimation: when it stops editing.

It will also require changes to other dataSource methods to return the corresponding values, as if there was only one section when self.tableView.editing == YES .

+2
source

All Articles