iOS11 UISearchBar missing in UINavigationBar when embedded in UISplitViewController
问题 Strange things seem to happen when using the new iOS 11 navigationItem.searchController method on a detail view of a UISplitViewController . The searchBar partly appears as a blank space on the first presentation, then appears in the wrong UITableViewController , but corrects itself after a few push and pops of UITableViewController . I used to put the searchBar in the tableHeaderView , but I changed the code according to the WWDC recommendation: if (@available(iOS 11.0, *)) { self