So I have a list.plist with all my items in it. They are all strings with a Key and a Value.
I have 'courses' declared as a NSDictionary
and 'courseKeys' declared as NSArray
.
To load all the items into my table-view I used this code
My question is, how can I make it so that each starting letter has its own section, so I can easily navigate between letters?
I know that I can set the sectionIndexTitlesForTableView and I can show letters A-Z on the right sidebar, but how do I make them navigate to the correct letter?
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
NSMutableArray *searchArray = [NSMutableArray arrayWithObjects:
@"A", @"B", @"C", @"D", @"E", @"F", @"G", @"H", @"I", @"J", @"K", @"L",
@"M", @"N", @"O", @"P", @"Q", @"R", @"S", @"T", @"U", @"V", @"W", @"X", @"Y", @"Z", nil];
return searchArray;
}