如何在iOS7中更改UITableView的IndexBar的backgroundColor?

问题描述:

我需要更改backgroundcolorIndexBarUITableViewiOS7如何在iOS7中更改UITableView的IndexBar的backgroundColor?

默认为IndexBar backgroundColor为白色,textColor为蓝色,如下图所示。

enter image description here

我想给的backgroundColor改为clearColortextColor红色。

我如何在iOS7中做到这一点?

对不起。我为自己的问题得到了答案。

这里是码

[[self tableView] setSectionIndexColor:[UIColor redColor]]; 
[[self tableView] setSectionIndexBackgroundColor:[UIColor clearColor]]; 
+0

感谢大量:)(y)的 – ishhhh