2015-05-29 36 views
-5

如何在swift中更改tableview中節的textcolor。如何在swift中更改tableView節中的文本顏色

viewForHeaderInSection

+1

你會發現有用的手冊! SO不是Google的代理。 https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILabel_Class/#//apple_ref/occ/instp/UILabel/textColor。 –

回答

1
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 
} 

希望這會幫助你。

相關問題