Tom Fobear
Tom Fobear

Reputation: 6749

get the frame for a UITableView section

how would one get the frame of a whole section in a grouped table view?

I want to isolate a section when editing by setting the table view's bounds to that frame.

Upvotes: 4

Views: 4560

Answers (2)

bshirley
bshirley

Reputation: 8357

You might want to deleteSections:withRowAnimation: when the table goes into editing mode and insertSections:withRowAnimation: when it leaves editing.

This would also require changes to other dataSource methods to return appropriate values as if there is only one section when self.tableView.editing == YES.

Upvotes: 2

user756245
user756245

Reputation:

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

Upvotes: 17

Related Questions