A: 

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
A: 

Didn't you try : mainViewController.searchDisplayController.searchBar.text=selectedKeyword;

You access the search bar field from the search controller and you update its text content.

yonel