Bil*_*lal 8

使用UITableView方法sectionIndexColorsectionIndexBackgroundColor

tableView.sectionIndexColor = UIColor.red
tableView.sectionIndexBackgroundColor = UIColor.clear
Run Code Online (Sandbox Code Playgroud)