Now it works i don't know what happened. I think I tried to deactivate the search display controller after changing the text. Anyway thanks for help. I think I also tried to change the original textfield not the one belonging to the search display controller and they are different (different adresses in memory as far as i observed)
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//NSLog(@"didSelectRowAtIndexPath");
if (allKeywords.count > 0)
{
didSelectKeyword = TRUE;
self.selectedKeyword = (NSString *)[allKeywords objectAtIndex: indexPath.row];
NSLog(@"keyword didselectrow at idxp: %@", self.selectedKeyword);
//shouldReloadResults = FALSE;
[[mainViewController searchController] setActive:NO animated: YES];
[mainViewController.searchController.searchBar setText: self.selectedKeyword];
}
}
kudor gyozo
2010-03-15 08:55:57