Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I customize section header in a UITableView? (font, image...)

Can I customize section header in a UITableView? (font, image...) I'd like to achieve something like this:

enter image description here

Is that possible? I already got my cells like I wanted, but not section header. Thanks.

like image 304
Ricardo Avatar asked Dec 09 '22 00:12

Ricardo


1 Answers

You can create a custom view for your tableView's section header by implementing the method tableView:viewForHeaderInSection:

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

    // create and return a custom UIView to use for the section here 

}
like image 63
jonkroll Avatar answered Feb 09 '23 00:02

jonkroll