ios 索引的设置

#pragma mark 设置索引数

- (NSArray<NSString *> *)sectionIndexTitlesForTableView:(UITableView *)tableView

{

           tableView.sectionIndexBackgroundColor = [UIColor clearColor];//设置背景的颜色

           tableView.sectionIndexColor = MOSTCOLOR;//设置文字的颜色

           NSArray *array = [self.allBrandDic.allKeys sortedArrayUsingSelector:@selector(compare:)];

    return array;

}

原文地址:https://www.cnblogs.com/lsh1234/p/8350774.html