【发布时间】:2023-03-14 07:40:01
【问题描述】:
我的 tableview 中有两个部分,我想为 tableView 的不同 sectionHeaders 设置不同的颜色,我该怎么做?
func tableView(tableView: UITableView!, titleForHeaderInSection section: Int) -> String! {
if (section == 0) {
return "Item1"
}
if (section == 1) {
return "Item2"
}
}
【问题讨论】: