ios - 删除 TableView iOS 7 上的色调

标签 ios uitableview ios7

我正在尝试删除字母索引器后面的白色 View ,但没有成功。 我试图说清楚,但到目前为止没有任何效果。

enter image description here

最佳答案

sectionIndexBackgroundColor 正是您要找的。你可以这样做,

tableView.sectionIndexBackgroundColor = [UIColor clearColor];

如果要更改突出显示状态的颜色,请使用以下属性。

tableView.sectionIndexTrackingBackgroundColor = [UIColor redColor];

请记住,sectionIndexBackgroundColor 在 iOS7 中可用。因此,如果您支持 iOS6,您可能希望这样调用。

if ([tableView respondsToSelector:@selector(sectionIndexBackgroundColor)]) {
    tableView.sectionIndexBackgroundColor = [UIColor clearColor];
}

关于ios - 删除 TableView iOS 7 上的色调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18742285/

相关文章:

ios - 根据来源不同,Unwind Segue 也不同

ios - UIbutton在点击后改变颜色

ios - 当应用程序进入后台时显示暂停菜单

iOS >> CoreData >> 如何找到特定的应用程序文件夹?

ios - 在 UIView 上上下滑动工作但 ScrollView 阻碍它快速?

in-app-purchase - 应用内购买在 iOS7 中不起作用

ios - MPVolumeView 在 iOS 7 中无法正确重绘

ios - - (BOOL)loadShaders 方法对我不起作用

ios - 在 TableView 中插入行而不在代码中存储数据源

swift : How to center cell text