title: How to implement UISearchController with objective c
body: <p>I have an existing app, written in objective-c, with a table view.</p>
  
  <p>I am now trying to go back to this app and add a search bar to the table.</p>
  
  <p>The problem is that now there is the new <code>UISearchController</code> protocol, there seems to be very little information online in how to implement this within objective-c - all tutorials and examples that I can find are all for Swift.</p>
  
  <p>I have added the delegates to the .h file:</p>
  
  <pre><code>UISearchBarDelegate, UISearchResultsUpdating
  </code></pre>
  
  <p>And I have the following code in <code>viewDidLoad</code>, which works and adds a search bar:</p>
  
  <pre><code>// Search controller
  searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
  searchController.searchResultsUpdater = self;
  searchController.dimsBackgroundDuringPresentation = NO;
  searchController.searchBar.delegate = self;
  
  // Add the search bar
  self.tableView.tableHeaderView = searchController.searchBar;
  self.definesPresentationContext = YES;
  [searchController.searchBar sizeToFit];
  </code></pre>
  
  <p>And that is as far as I have got!</p>
  
  <p>I would appreciate any pointers, example code or tutorials on how to implement the new UISearchController in an existing objective-c app tableview.</p>