I am using UISearchController to present a search bar inside the header view of a tableview:
... self.searchController.hidesNavigationBarDuringPresentation =
Found it! This seems to be the offensive line in viewDidLoad of the presenting vc:
viewDidLoad
self.edgesForExtendedLayout = UIRectEdgeNone;
Removed that and the search bar stayed in place as predicted.