如何在swift中更改tableView节中的文本颜色
答
override func tableView(tableView: UITableView!, viewForHeaderInSection section: Int) -> UIView! {
var customView:UIView?
customView.frame = // set frame according to tableview width and header height
customView.backgroundColor = UIColor.greenColor()
return customView
}
希望这会帮助你。
你会发现有用的手册! SO不是Google的代理。 https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILabel_Class/#//apple_ref/occ/instp/UILabel/textColor。 –