Fixed header to UITableview?

I finally figured this out right after posting. Figures. 🙂

Here’s what I did, in case others run into the same problem:

  1. Delete the existing UITableViewController and its XIB. They’re junk. Get really mad while you do.

  2. Make a new UIViewController subclass with a XIB

  3. Open XIB in IB and add your header stuff and a UITableView to the UIView

  4. In the IB Outlets for UITableView make sure you connect Delegate and DataSource to your File Owner

  5. In the header for your view controller, be sure to add <UITableViewDelegate, UITableViewDataSource> to implement these protocols

  6. Implement all the regular UITableView delegate and data source methods you know and love, but in your UIViewController instead of the way you’re used to doing it through UITableViewController

After this things should work.

Leave a Comment