2

The way to put a Header to UITableView in a storyboard is explained in another thread, that you drag and drop your component (in my case a view) on top of the first proto cell. That sticks than as tableview header (not section)

My Problem is, if you drag and drop e.g. a SearchBar and run the app, the seacrh bar is behind the NavigationBar, you can pull the tableview down and you see the searchbar.

If you do the same with a view, you can never put the view away with scrolling up the tableview, it is always visible.

Does anyone know how to hide it like as the search bar ?

i-developer
  • 441
  • 4
  • 12
  • Have you tried setting the contentOffset property on the tableview? –  Dec 19 '14 at 21:00
  • Unfortunately this does not work either. After setting the contentOffset the view in the header moves out of sight, but if you pull the table down and bring the view to its position cause that it never can be put back again behind the navigation bar, it slides automatically down again – i-developer Dec 20 '14 at 21:03

1 Answers1

0

Might be this answer is too late but for others maybe useful

after i googled it, i ended with this question , and yeaaa this save my day

Click here

Community
  • 1
  • 1
Gabrail
  • 216
  • 2
  • 16