Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView section header height for non-grouped table

Tags:

Greetings! I know that UITableView sectionHeaderHeight is only used for grouped tables, but I'll ask anyway (in case there's some way to do this that isn't obvious) ...

Is there a way to change the section header height (and with it, the font/size) for a NON-grouped table?

Hoping "yes" or at least a "maybe" ... but fearing it might be a "no". Have at it, folks.

like image 730
Joe D'Andrea Avatar asked Aug 05 '09 21:08

Joe D'Andrea


1 Answers

Yes.

Use this delegate method:

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {     return 44; } 

Of course, change as appropriate. There's of course the one for footer as well:

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {     return 44; } 
like image 157
Aleksandar Vacić Avatar answered Sep 20 '22 21:09

Aleksandar Vacić