Scroll to TableViewHeader using "tableView:sectionForSectionIndexTitle:atIndex:" help?

Viewed 6247

I added a search bar into my TableViewController's header, and I've also added a "{search}" to the "sectionIndexTitlesForTableView" array. Now on the right side, I got the letters of the alphabet + the search symbol on the top... to scroll to the sections of the letters (not the search field) I used this:

- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{

    return index -1;
}

now when I click the letter A, it scrolls to the section A and so on. Only I can't make the "search symbol" scroll to the search bar in the tableView's header...

How can I do this?

Thank you in advance...

enter image description hereenter image description here

3 Answers
Related