我需要更改backgroundcolor
中IndexBar
的{{1}} UITableView
。
默认情况下,iOS7
backgroundColor为白色,IndexBar
为蓝色,如下图所示。
我想将backgroundColor更改为textColor
,将clearColor
更改为红色。
我怎么能在iOS7中做到这一点?
答案 0 :(得分:26)
对不起。我得到了自己问题的答案。
这是代码
[[self tableView] setSectionIndexColor:[UIColor redColor]];
[[self tableView] setSectionIndexBackgroundColor:[UIColor clearColor]];