Hi I am a newbie to iphone programming.
I took the sample code from TableSearch in apple documentation and tried working. I have a navigation controller and when i select one row to goes to another UITableviewController.I have made my table search in that view. But it doesn't load the table....please help.
Error maybe in this part.
- (void)viewDidLoad {
[super viewDidLoad];
NSMutableArray *listContent = [[NSMutableArray alloc] initWithObjects:
[Product productWithType:@"Device" name:@"iPhone"],
[Product productWithType:@"Device" name:@"iPod"],
[Product productWithType:@"Device" name:@"iPod touch"],
[Product productWithType:@"Desktop" name:@"iMac"],
[Product productWithType:@"Desktop" name:@"Mac Pro"],
[Product productWithType:@"Portable" name:@"iBook"],
[Product productWithType:@"Portable" name:@"MacBook"],
[Product productWithType:@"Portable" name:@"MacBook Pro"],
[Product productWithType:@"Portable" name:@"PowerBook"], nil];
self.title = @"Products";
self.filteredListContent = [NSMutableArray arrayWithCapacity:[self.listContent count]];
if (self.savedSearchTerm) {
[self.searchDisplayController setActive:self.searchWasActive];
[self.searchDisplayController.searchBar setSelectedScopeButtonIndex:self.savedScopeButtonI ndex];
[self.searchDisplayController.searchBar setText:savedSearchTerm];
self.savedSearchTerm = nil; }
[self.tableView reloadData];
self.tableView.scrollEnabled = YES;
}