I am adding a dynamically scrolling UISearchBar to the top of a tableview. To do this, I have added the UISearchBar as a subview of the tableview and then implemented a scrollviewdelegate method so that the searchbar stays pinned to the top at all times. I also set the contentInset of the tableView accordingly so that the top most cell is offset enough for the searchbar.
The only issue I'm having is with the default separator that's drawn above the first cell in the tableview. When starting at the top, and scrolling down, the separator is actually drawn above the search bar, instead of below it. This creates for a horrible user interface bug that I'd like to fix. Note that this only happens with the first cell; every other separator between cells scrolls under the searchbar, as it should, and does not have the same UI bug. Any thoughts?