iphone - UITableView部分索引背景?

标签 iphone uitableview

enter image description here

如何消除部分索引中的白色?当我完全删除部分索引时,它看起来是这样的: enter image description here

那么是部分索引导致了问题吗?但是当我使用相同的代码构建 iPhone 版本时,我得到了这个:

enter image description here

没关系,我找到了解决方案。太长了,无法输入,但我已修复它。这与自动调整蒙版大小有关。

最佳答案

表格 View 具有编辑部分索引字体颜色和背景颜色的代表。

if ([self.tableView respondsToSelector:@selector(setSectionIndexColor:)]) {
    self.tableView.sectionIndexColor = [UIColor whiteColor];
    self.tableView.sectionIndexBackgroundColor = [UIColor colorWithWhite:0.3 alpha:0.7];
}

关于iphone - UITableView部分索引背景?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9138126/

相关文章:

iphone - 如何在 Google Analytics for iOS 中设置页面标题?

ios - TableView 数据源和委托(delegate)方法调用而不从 Web 服务加载数据?

ios - UITableViewCell 无法将标签约束到右边缘

uitableview - Swift 中的自定义 UITableViewCell 注册类

iphone - 将 UILabel 转换为具有相同大小和对齐方式的 NSString

iphone - 有关类属性的问题显示为空

iphone - 使用带有 webView 的 View 时,并不总是检测到摇动手势

c# - 如何使用 MonoTouch 获取 iPhone/iPad 的宽度和高度?

iphone - 如何从 UI 深处的 Controller 访问 ManagedObjectContext?

ios - 如何在 UITableview 中创建一个包含 n 行的 UITextField