Created
February 27, 2010 01:00
-
-
Save Jberlinsky/316354 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar | |
{ | |
[searchBar resignFirstResponder]; | |
NSLog(@"Search Text: %@",[searchBar text]); | |
[self startSearchingWithText:[searchBar text]]; | |
} | |
- (void) startSearchingWithText:(NSString *)text { | |
... | |
// Go through the list of services and set up a query for the search term | |
QueryServiceManager *manager = [[QueryServiceManager alloc] initWithServices: services]; | |
// Set up the query | |
if (![manager addKeyword: text]) | |
NSLog(@"PROBLEM!"); | |
// Execute the query and store the titles in an array | |
self.data = [[manager makeQuery] copy]; // Returns a NSArray | |
NSLog(@"%@",self.data); | |
// Add the items to the tableView | |
[self.tableView reloadData]; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment