Reputation: 3759
I'm unashamedly editing this to bump it back up - I'm still stumped by this! :)
I have a grouped tableview. I have custom header views, which the user can tap to expand the cells in that section (see below - apologies but I had to obfuscate the text in the cells).
When I tap on a section header, the cells for that section are inserted/removed with top animation. Problem is, I can see the cells briefly animating down to their correct place in a small area which I have highlighted in yellow. In the example, it is the cell in blue which I see briefly in the area highlighted in yellow.
This translucent area appears for any section that contains cells. Sections with no cells do not have this translucent area.
The section header view is highlighted in red. It would appear that there is some space or padding between the last cell of the previous section and the next header view.
What is this area, and how do I access it to change the properties so that it's not translucent? i.e I don't want to see any cells "flying past" this area to get to their designated section.
If I switch to non-grouped, there is no issue - cells animate in and out without being seen in the background of anywhere else.
Can anyone help me please?
Upvotes: 0
Views: 418
Reputation: 161
These two methods in UITableViewDelegate
might help you:
- (UIView *)tableView:(UITableView *)tv viewForFooterInSection:(NSInteger)section;
- (CGFloat)tableView:(UITableView *)tv heightForFooterInSection:(NSInteger)section;
And in UITableView
:
@property(nonatomic) CGFloat sectionFooterHeight
Explicitly returning them will give you more control of the padding in your table view.
Upvotes: 1