I am using UISearchController
and the UISearchBar
also has a scope bar. The search bar is added as a subview to a UIView
which is above the UItableView
. I have done it this way since I want the search bar to be always visible even when the tableview is scrolled.
The problem is the scopebar overlaps the first tableview cell
StoryBoard
Scope bar overlapping the tableview cell
How can I prevent this overlapping?, I can't display the searchbar in navigationbar since the scopebar when placed in navigation bar does not get displayed.
tableView.contentInset = UIEdgeInsetsMake(64, 0, 0, 0)
which will push tableView's content 64 points down… you should set that to what ever the size of the scopebar is... – Unshroudhttps://developer.apple.com/library/ios/documentation/UIKit/Reference/UISearchControllerDelegate_Ref/index.html
– Unshroud