Quantcast
Channel: Change Default Scrolling Behavior of UITableView Section Header - Stack Overflow
Viewing all articles
Browse latest Browse all 20

Answer by Doc for Change Default Scrolling Behavior of UITableView Section Header

$
0
0

Originally posted Here, a quick solution using the IB. The same can be done programmatically though quite simply.

A probably easier way to achieve this (using IB):

Drag a UIView onto your TableView to make it its header view.

  1. Set that header view height to 100px
  2. Set the tableview contentInset (top) to -100
  3. Section headers will now scroll just like any regular cell.

Some people commented saying that this solution hides the first header, however I have not noticed any such issue. It worked perfectly for me and was by far the simplest solution that I've seen so far.


Viewing all articles
Browse latest Browse all 20

Trending Articles