I am having a view controller with a UITableView and a Custom View.The storyboard configuration is Custom View is alligned with top, leading and trailing margin of my view controller's main view.Custom View is having a constant height. UITableView's top is alligned with bottom of the Custom View. UITableView's leading, trailing and bottom is alligned with leading, trailing and bottom of main view. I am adding a UISearchController's search bar as UITableView header. This view controller is pushed on UINavigationController Stack. Now when user clicks on search bar navigation bar hides to make way for searchbar.But as custom view is above the UITableView it accomodates the position where UISearchBar should have been. I want to move Custom View out also and take the UISearchBar position which would have been in normal scenario without Custom View above. Help will be appreciated.