表头显示关键字
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
NSArray* Keys = [[addressBookDic allKeys] sortedArrayUsingSelector:@selector(compare:)];
return [Keys objectAtIndex:section];
}
右边显示关键字母
-(NSArray*)sectionIndexTitlesForTableView:(UITableView*)tableView
{
return [[addressBookDic allKeys] sortedArrayUsingSelector:@selector(compare:)];
}