Reputation: 18578
I just implemented the UITableViewDelegate::viewForHeaderInSection method to return a custom view. However, when I run the app and load the table view, I notice that header view remains stationary while the rest of the table cells scroll underneath it. What gives? How do I get it to scroll with the rest of the table?
Thanks for your wisdom!
Upvotes: 1
Views: 432
Reputation: 17143
That's how it's meant to work. The header for a section will stay at the top of the tableview to give the user a sense of which section she is currently in. Then when she scrolls further down into the second section, that section header scrolls into view and then eventually replaces the first section header at the top.
You can see this in the Contacts app on your phone.
Upvotes: 2