i’ve a UISearchBar and when i search for contents, it show only the title of the first section. I have 3 sections, and this code:
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
if(searching)
return @"Search Results";
if (section == 0)
return @"First";
if(section == 1)
return @"Second");
else
return @"Third");
}
Is that supposed that when i search the title should change depending on the contents of the sections?
I.E. if i have “A” in “First”, “B” in “Second”, “C”, in “Third”, should it change to the respective section title for each element i search?
Also, when i search for a content DIFFERENT from the first section (i.e. “C”), and i click on its row, the nib controller doesn’t show up. It shows just the elements of the first sections properly.. Why?
1 Answer