Frame of viewForHeaderInSection is always the same size

Posted by gabac on Stack Overflow See other posts from Stack Overflow or by gabac
Published on 2010-03-15T20:08:42Z Indexed on 2010/03/15 20:09 UTC
Read the original article Hit count: 328

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {

if(section != 0) {

UIView *view = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 100, 30)]; view.backgroundColor = [UIColor redColor];

return view;

[view release]; } else { return tableView.tableHeaderView; }

}

This is my implementation of viewForHeaderInSection but whatever frame I make it's always showing me the same red frame. Do you see any problem with my code?

Can't post the picture because of my rep but here is the link ;-)

http://img638.imageshack.us/img638/3350/bildschirmfoto20100315uq.png

© Stack Overflow or respective owner

Related posts about iphone

Related posts about grouped-table