title: SearchBar in Navigation Bar in iOS7
body: <p>I have a tableview containing all the countries and their flags.  I've been working to add a search bar and had it all working until I decided to move the search bar into the navigation bar allowed in iOS7 (for my purposes, that layout works very well).</p>
  
  <p>Now, the table loads fine, the search bar shows up fine.  As I type into the search bar, I can see the filtered list being built via the console.  All looks good, EXCEPT the search results table never displays. In other words, I don't see the filtered list in a new tableview.  </p>
  
  <p>This method is being called to build the filtered list:</p>
  
  <pre><code>-(void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
  </code></pre>
  
  <p>But the standard method:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  </code></pre>
  
  <p>never gets called.  </p>
  
  <p>As I said, it's working fine when the search bar isn't in the navigation bar.  I have assigned the following delegates and properties in ViewDidLoad:</p>
  
  <pre><code>searchDisplayController.delegate = self;
  searchDisplayController.searchResultsDataSource = self;
  searchDisplayController.searchResultsDelegate = self;
  
  searchDisplayController.displaysSearchBarInNavigationBar = YES;
  </code></pre>
  
  <p>I also have:</p>
  
  <pre><code>#pragma mark - UISearchDisplayController Delegate Methods
  -(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString {
  // Tells the table data source to reload when text changes
  [self filterContentForSearchText:searchString scope:
   [[searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:[searchDisplayController.searchBar selectedScopeButtonIndex]]];
  // Return YES to cause the search result table view to be reloaded.
  return YES;
  </code></pre>
  
  <p>}</p>
  
  <p>What am I missing???</p>