UITableView表索引的颜色设置

UITableView表索引的颜色设置_第1张图片

更改索引的背景颜色:

self.tableView.sectionIndexBackgroundColor = [UIColor clearColor]; 

更改索引的文字颜色:

self.tableView.sectionIndexColor = [UIColor blueColor];
 
  

if ([self.tableview respondsToSelector:@selector(setSectionIndexColor:)]) {

        /** 背景色 */

        self.tableview.sectionIndexBackgroundColor = [UIColor redColor];

        /** 字体颜色 */

        self.tableview.sectionIndexColor = [UIColor blueColor];

        

    }

你可能感兴趣的:(iOS,UI层技术)