Sorry if the title isn't that clear, found it tricky to summarise.
Using Xcode 6 Beta 4, target iOS 8:
I have a UITabBarController and one of its controllers is a UITableViewController (TVC). This TVC has a searchController property which is the new UISearchController which is replacing UISearchDisplayController. Initialising it like so (I would have just added it to my storyboard but the searchController in the object library down in the bottom right is still a UISearchDisplayController - should I file a radar for this?):
self.searchController = [[UISearchController alloc]initWithSearchResultsController:nil];
self.searchController.dimsBackgroundDuringPresentation = NO;
self.searchController.searchResultsUpdater = self;
self.searchController.delegate = self;
self.searchController.searchBar.frame = CGRectMake(0, 0, 320, 44);
self.tableView.tableHeaderView = self.searchController.searchBar;
Getting to the point, if the searchBar is first responder:
and then another tab is selected on the tabBar, and then you come back:
I have no idea why this is happening? UISearchController bug perhaps? Or is the documentation not telling me something that I should be doing (it lacks detail at the moment).