Here is my issue. I have a screen in a tab bar application that display's a search bar, and a UITableView. When you first open the tab, the UITableView is empty. After you enter a search, the iphone gets and parses XML based on the query.
All of this is working fine. I add the xml data to the underlying array that SHOULD populate the table. I have verified that the array contains the data, and is not null. The UITableView remains blank after I search. Any help?
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
//test line
NSLog(@"%@",searchBar.text);
NSString *criteria = [[NSString alloc] initWithString:searchBar.text];
//Parse xml
NSString *uidString = @"55555";
NSString *varString = [[NSString alloc] initWithFormat:@"qryid=4&uid=%@&Criteria=%@",uidString,criteria];
NSString *urlString = [[NSString alloc] initWithString:@"http://services.auctiontrac.com/websvc.asp"];
NSString *parsingString = [[NSString alloc] initWithFormat:@"%@?%@",urlString,varString];
xmlSearch = [[XMLSearch alloc] loadXMLByURL:parsingString];
//init array for table
tableArray = [[NSMutableArray alloc] init];
carTable = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
[carTable reloadData];
//Add search results to UITableView
for (Car *c in [xmlSearch cars]) {
[tableArray addObject:c.make];
NSLog(@"Added item with make: %@",c.make);
}
[searchBar resignFirstResponder];
}
Let me know If you need more code to answer this question.