luugiathuy / GTScrollNavigationBar

A scrollable UINavigationBar that follows a UIScrollView
BSD 3-Clause "New" or "Revised" License
552 stars 85 forks source link

Problems With Tableview Section headers #31

Closed andyfitter closed 9 years ago

andyfitter commented 9 years ago

I've modified the sample code to add some section headers, say after every 10 rows. All works fine if I stay within a single view controller, but if I scroll down the tableview, and then drill down into a new VC, and then come back, the tableview section header is rendered in the wrong place relative to the rest of the table cells. It appears to be offset by 64 pixels, the height of the Nav bar + status bar. Scrolling the tableview immediately fixes this problem.

It appears to be related to having automaticallyAdjustEdgeInsets set - Almost as if the top inset is being applied twice - Once automatically and once by the code, adding on an extra 64 pixels.

This effectively makes this code completely broken if you want to use section headers in multiple VCs pushed onto the same NavigationController