tags:

views:

18

answers:

2

I am using UISearchDisplayController to pull in results from a webservice but I want to be able to search even if the search bar's text is empty. It seems like results are only being pulled in if this is not empty. How do I update & show the results tableview by only scope?

A: 

For that you can put the condition when the scope button is changed

if([searchBar.text length])
{
  //CALL FOR QUERY ACCORDING TO TEXT IN SEARCHBOX
}
else
{
  //CALL THE QUERY AS PER CHANGE IN SCOPE
}

hAPPY cODING...

Suriya
A: 

Use the - (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller UISearchDisplayControllerDelegate to search and then reload the searchResultsTableView (UISearchDisplayController)

Sander Backus
Thanks but the problem isn't that I can initiate the search, it's that the resultsTableView will not display unless you have something entered in the UISearchBar.
Kyle Decot