Friday, April 20, 2012

UITableViewCell Selection Area - How to fill entire cell for top/bottom cells of a Grouped UITableView section?

I have a grouped-style UITableView. Within the tableView, I have rows arranged into sections, since the sections have variable numbers of rows. However, I have opted to push all of the sections together (for UI reasons) so that they look like one large section with multiple (expandable) rows.

The problem I am having is that I want the selection area for the top and bottom rows in each section to fill the entire cell - in other words, NOT to have the rounded corners.

I know that a plain tableview has full selection for the cells, but I cannot change from a grouped tableview to a plain tableview because that has other unwanted consequences.

I understand how to mask a the cell's selectedBackground to have rounded corners if it does not already have them, but I haven't been able to find a way to 'unround' the corners for the top and bottom cells of a section. I have created dummy rows for the bottom rows in each section, which seems to work, though it's tedious; but I can't do a dummy row for the top row since it makes that separator line too thick.

Is it possible to 'unround' the selection area of a top/bottom section row in a grouped UITableView?

No comments:

Post a Comment