1

I am working on a app for the iPad which has a tableView on the left and a view on the right. We are not using the UISplitViewController.

I have been able to setup filtered results using the Search Display Controller and a search bar, but the search results take up the entire screen.

Ideally, I would like to have the search results only take up the same amount of screen as our tableView. Or, barring that, have a way to dismiss the search results when 'didSelectRowAtIndexPath' is activated.

I'm not sure what code I should post. I'm using the code from the Apple code sample: TableSearch.

  • on the comment below: something like this..?

    [self.searchDisplayController.searchResultsTableView setFrame:myTableView.view];

mleko
  • 11,650
  • 6
  • 50
  • 71
Miriam H.
  • 671
  • 2
  • 8
  • 25

1 Answers1

2

By default, table views take up the whole screen, but there is nothing stopping you from setting their frame.

Just call -setFrame on the searchResultsTableView property of your search display controller.

Simon Goldeen
  • 9,080
  • 3
  • 36
  • 45