How to anchor viewForHeaderInSection views from UITableView at the top?

advertisements

I need to implement a table view with multiple sections and by specifying views for the viewForHeaderInSection. I know that the default behavior is that when a section header view is visible and the other section's header comes scrolling from the bottom, then the first one is pushed off the table view and the bottom one is placed on the top.

What I need is anchoring all these header views on top of the tableview, like stacking them under each other. What would be the best way to do this?


Don't add any data for that particular section. So, it would display only sections in tableview.