iphone - 如何更改索引 UITableView 中侧面字母的颜色?

标签 iphone uitableview

我有一个带有字母索引的表格 View ,并且正在使用侧面字母快速浏览列表。对于那些不熟悉的人,使用这个:

- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index {

我的问题是我的应用程序刚刚被皮肤变黑。所以现在很难看到侧面的字母了。

我不知道如何更改字母表的颜色。如果可能的话,我希望它是“白色”的。

最佳答案

如果您的最低 iOS 版本高于 6.0,您可以使用 UITableViewsectionIndexColor 属性。

The color to use for the table view’s index text.

@property(nonatomic, retain) UIColor *sectionIndexColor

Discussion:

Table views can display an index along the side of the view, making it easier for users to navigate the contents of the table quickly. This property specifies the color to use for text displayed in this region.

<小时/>

更新日期2014年1月13日

我找到一个开源第三方库:GDIIndexBar帮助自定义索引外观。

关于iphone - 如何更改索引 UITableView 中侧面字母的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/750119/

相关文章:

iphone - 超过 1 个部分的自定义背景 uitableview (IPHONE)

iPhone - 设备转动时禁止 UIView 旋转

iphone - iPhone 4 可实现的最低往返音频延迟是多少?

ios - 自定义框架中的完成方法

objective-c - TableView 单元格 Segues 不工作

ios - UITableViewCell 被格式化为默认大小

iphone - iPhone 支持的视频文件格式

iphone - UITableView滚动问题

ios - 按钮 sender.superview 显示为 UIViewController 而不是我的 CustomCell?

swift - 在 tableView 中放置一个 UIButton