Created
August 27, 2013 10:32
-
-
Save frr149/6351981 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSInteger)tableView:(UITableView *)tableView | |
sectionForSectionIndexTitle:(NSString *)title | |
atIndex:(NSInteger)index{ | |
NSLog(@"Touched on section %@", title); | |
NSInteger firstStartingWithLetter = 0; | |
// búsqueda de la primera familia cuyo nombre empieza | |
// por la letra tocada | |
for (NSString *familyName in self.familyNames) { | |
if ([[familyName substringToIndex:1] isEqualToString:title]) { | |
firstStartingWithLetter = [self.familyNames indexOfObject:familyName]; | |
} | |
} | |
return firstStartingWithLetter; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment