PROBLEM
I want to keep the UISearchBar at the top of my UITableview, but it scrolls away with the list when I scroll down.
I found this post and followed it link
It told me to use this code
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
// UISearchBar *searchBar = searchDisplayController.searchBar;
searchBar = self.searchDisplayController.searchBar;
CGRect rect = searchBar.frame;
rect.origin.y = MAX(0, scrollView.contentOffset.y);
searchBar.frame = rect;
}
I may have missed something, but this method is called but the UISearchBar stil disappears.