To fix the issue you can do I am trying to display three sections (@"Accounts and Tasks", @"Life Events", @"More") and relevant content in an UITableView. I am creating a custom UILabel for each row and try to display text.
will help you Finally came up with an acceptable solution to this question. This answer builds off of my question above (I'm using all the same code minus what is changed here). The main thing to note here is that @andrewbuilder was right - adding the search bar as a table header view will guarantee that the search bar will move on scroll; it's just acting like any other table header view. What I ended up doing was a combination of things. The main change I made in my approach was changing the way my main controller presents my search controller. Specifically, I went from self.definesPresentationContext = YES; to self.definesPresentationContext = NO;
this will help I don't know if this is the easiest way to achieve this, but it works. The first thing would be to not add the search bar as a header view, but rather to have it and a table view added to a separate scroll view. Something like this (margins for ilustratory purposes only) : light blue is the underlying scroll view