Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multi Column header for a UITableView with Multiple Columns

I have created a UITableView with multiple columns to display a Football League Table. Now what I really need is a header to label each column which will ideally sit at the top of the table view. How would I do this?

like image 548
Xetius Avatar asked Jan 23 '23 16:01

Xetius


1 Answers

Instead of setting it as the header for your first UITableView section, it would make more sense in your situation to set it as the header to your entire table. This can be done with the tableHeaderView property of UITableView. For example:

UIView *myHeaderView = ...
[myTableView setTableHeaderView:myHeaderView]; 
like image 121
Sebastian Celis Avatar answered Jan 31 '23 04:01

Sebastian Celis