【问题标题】:How change iOS TableView index Color? [duplicate]如何更改 iOS TableView 索引颜色? [复制]
【发布时间】:2017-11-07 01:44:35
【问题描述】:

如何自定义右侧列表的颜色和字体。

【问题讨论】:

标签: ios swift xcode uitableview cocoa-touch


【解决方案1】:

使用UITableView方法sectionIndexColorsectionIndexBackgroundColor

示例

tableView.sectionIndexColor = UIColor.red
tableView.sectionIndexBackgroundColor = UIColor.clear

【讨论】:

【解决方案2】:

您只需访问 UITableView

sectionIndexColor 方法
yourTableviewName.sectionIndexColor = UIColor.yourDesiredColor   
yourTableviewName.sectionIndexColor = UIColor.red // as Example i have used red color

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    • 2021-08-09
    • 2021-09-06
    相关资源
    最近更新 更多