*
You aren't clear about what behavior you are looking for. Do you want the header to stay or not? You have also not shown any code, so we don't know anything about your table
here's some things found by simple search:
link
That behavior is only common when the UITableViewStyle
property of the table is set to UITableViewStylePlain
. If you have it set to UITableViewStyleGrouped
, the headers will scroll up with the cells.
link
Actually the tableHeaderView scrolls with table. This is not the case for section header views. If you have only one section then you can have the header view as tableHeaderView.
table.tableHeaderView = aUiView;
If you have more than one sections and all of them have their own header views, then you have no choice than leaving the header views behave in their own ways. Or, you can imitate the header view by making/configuring/customizing the first row of each section look like header view and remove the actual section header views.
link
I think the best approach would be to use a plain UITableView with Header and Footer set, and "skin"/theme your custom UITableViewCells to look like grouped UITableViewCells.
you'd might want to have a look over here for some pointers on how to achieve this.
*
The cells you are referencing are table and section headers
You can include a custom header for every table section by implementing the UITableViewDelegate method
tableView:viewForHeaderInSection:
There are equivalent properties and methods for the table and section footers. (this is a good reference)
Create custom UIViews to assign to the headers and footers.
For the Horizontal scrolling behavior, you should place a TableView in the header/footer and rotate the table by 90 degrees; then in the cell of the rotated table, apply the rotation in reverse to the actual content. Now you have a cell that displays horizontally scrolling images etc.
In the code for the header/footer, create a TableView and transform the table
self.horizontalTableView.transform = CGAffineTransformMakeRotation(-M_PI * 0.5);
Then, in the cells of this table, you apply the transform in reverse on the content of the cell.
CGAffineTransformMakeRotation(M_PI * 0.5)
Voila, Horizontal Scrolling (see this tutorial:http://www.raywenderlich.com/4723/how-to-make-an-interface-with-horizontal-tables-like-the-pulse-news-app-part-2)