Search code examples
iphonethree20uisearchdisplaycontroller

Is there a way to remove the "No Results" label from a UISearchDisplayController?


I have a three20 controller that is using the new sdk3 UISearchDisplayController. I also have a model that is loaded from the network, it seems that no matter what I do the default behavior for the UISearchDisplayController is show "No Results" label. Is there a way to make it go away and show something else?


Solution

  • To modify the "No Results" text you need to implement the titleForEmpty method in your TTTableViewDataSource.

    - (NSString*)titleForEmpty {
      return @"No names found";
    }