做項(xiàng)目時(shí)遇到表視圖的索引條顏色(白色)擋住了表視圖的headerView的背景色,像被切了一塊一樣,想把索引條顏色改為透明(clearColor)
可以在UITableView任意一個(gè)帶:(UITableView*)tableView參數(shù)的代理方法里面實(shí)現(xiàn),代碼如下:
-(NSArray*)sectionIndexTitlesForTableView:(UITableView*)tableView
{
//更改索引的背景顏色
tableView.sectionIndexBackgroundColor= [UIColorclearColor];
//更改索引的背景顏色:
tableView.sectionIndexColor= [UIColororangeColor];
}