I have a UITableView and UISearchDisplayController but when i scroll tableview the searchbar also scrolls along with it. To overcome this i moved UISearchDisplayController searchbar outside UITableView and now my layout is as below, also adjusted the searchbar y position to 65 & corresponding adjusted height of tableview
View
-> SearchBar
-> TableView
-> ContentListCell
After moving out searchbar, when i start searching the searchbar moves above and its not seen. How can i fix the issue? I want to keep the searchbar at the top position.
Thanks.
If you don't want the UISearchbar to move up when becoming active, you can set the property displaysSearchBarInNavigationBar to NO for UISearchDisplayController.