iOS 设置tableView右侧索引

1.设置右侧索引字体颜色

 self.tabView.sectionIndexColor = [UIColor blackColor];

2.设置右侧索引背景色

self.cityTabView.sectionIndexBackgroundColor =[UIColor blackColor];

//显示每组标题索引

-(NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView

//返回每个索引的内容

-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

//响应点击索引时的委托方法

-(NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString*)title atIndex:(NSInteger)index

posted @ 2016-08-20 16:12  瀚海枭龙  阅读(8385)  评论(0编辑  收藏  举报