JoeFryer/JDFPeekaboo

Issue while adding section header for UITableView.

Opened this issue · 3 comments

When add Section header it will not move up with Tableview for Tabbar with Navigation bar.

Hey, thanks for reporting. I'll take a look.

If you could create a quick project showing the described behaviour, that would be useful.

Please check attached screenshot. i've just download sourcecode and set section header.

-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *v = [[UIView alloc]initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, 50)];
[v setBackgroundColor:[UIColor redColor]];
return v;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 50;
}

ios simulator screen shot apr 27 2015 11 43 28 pm

Interesting. I've had a quick look, it's not immediately obvious how to fix it. I'll look into it further when I get chance.

As a workaround, it seems to be okay for grouped table views.