Ok, so how do you do that?
Good news is that it's really simple - as soon as you figure it out once. Check Apple iOS SDK for UITableView Class Rerefence and you'll find:
Section Index IconsBasically you need to define two methods:
Requests icon to be shown in the section index of a table view.
UIKIT_EXTERN NSString *const UITableViewIndexSearch;
If the data source includes this constant string in the array of strings it returns in sectionIndexTitlesForTableView:, the section index displays a magnifying glass icon at the corresponding index location. This location should generally be the first title in the index.
Available in iOS 3.0 and later.
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableViewEasy, right? Now try to use that when app supports screen rotation :) Yes, I've done it as you can see in FontType. Sorry, not going to cover that now. Still not 100% sure I've got it completely right in all possible cases e.g. whether app displays search results vs. not, going into and returning from details view while screen rotates in between etc.
NSMutableArray *indexList =
[NSMutableArray arrayWithCapacity:[self.otherList count]+1];
for (NSString *item in self.otherList)
[indexList addObject:[item substringToIndex:1]];
- (NSInteger) tableView:(UITableView *)tableView
if (index == 0)
[tableView setContentOffset:CGPointZero animated:NO];
return index - 1; // due magnifying glass icon
But at least you now got the magnifying glass icon. Best of all, it's defined in SDK and thus future compatible!