title: Can't push a view onto searchResultsController
body: <p>I have a TableViewController, a SearchResultsController and a WebViewController. When I click on a cell in the TableViewController it pushes the WebViewController opening a url that is related to the cell. </p>
  
  <p>The TableViewController has a UISearchController which filters the results into the SearchResultsController however when a cell is clicked in the SearchResultsController the WebViewController doesn't get pushed.</p>
  
  <p>Here is the code for the didSelectRowAtIndexPath for the SearchResultsController:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      WebViewController *webViewController = [[WebViewController alloc] init];
  
      NSString *extensionURL = (self.searchResults[indexPath.row])[@"url"];
      NSURL *baseURL = [NSURL URLWithString:@"http://www.baseurl.com"];
      NSURL *URL = [NSURL URLWithString:extensionURL relativeToURL:baseURL];
  
      webViewController.title = (self.searchResults[indexPath.row])[@"title"];
      NSLog(@"%@", URL);
      webViewController.URL = URL;
      [self.navigationController pushViewController:webViewController
                                           animated:YES];
  
  }
  </code></pre>
  
  <p>I included the NSLog to see if anything happened when a cell was clicked and it does display the url in the console. This makes me think the problem is with the navigationController.</p>
  
  <p>Looking online it seems that the UISearchController should be wrapped in a UISearchContainerViewController which should then be put in the navigationController. I'm still new to app development and can't figure out how or where to do this.</p>
  
  <p>I call my SearchResultsController in the viewDidLoad of my TableViewController like so:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      SearchResultsViewController *controller = [[SearchResultsViewController alloc] initWithStyle:UITableViewStylePlain];
      [self addObserver:controller forKeyPath:@"results" options:NSKeyValueObservingOptionNew context:nil];
  
      self.searchController = [[UISearchController alloc] initWithSearchResultsController: controller];
      self.searchController.searchResultsUpdater = self;
      self.searchController.hidesNavigationBarDuringPresentation = NO;
      self.searchController.dimsBackgroundDuringPresentation = NO;
      self.searchController.delegate = self;
      self.definesPresentationContext = YES; 
  
      UISearchBar *searchBar = [[UISearchBar alloc] init];
      searchBar = self.searchController.searchBar;
      searchBar.searchBarStyle = UISearchBarStyleMinimal;
      UITextField *searchField = [searchBar valueForKey:@"_searchField"];
      searchBar.barTintColor = [UIColor whiteColor];
      searchBar.tintColor = [UIColor whiteColor];
  
      self.navigationItem.titleView = searchBar;
  
  }
  </code></pre>
  
  <p>Is this where I should be embedding my SearchResultsController?</p>