29,049
社区成员




func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?{
let cellID = "headerCell"
var headerCell = tableView.dequeueReusableCellWithIdentifier(cellID)
as? HeaderCell
headerCell?.backgroundColor = UIColor.greenColor()
if(headerCell == nil){
headerCell = HeaderCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: cellID)
}
switch section {
case 0:
headerCell!.headerLabel.text = "模式"
break
case 1:
headerCell!.headerLabel.text = "风速"
break
default:
headerCell!.headerLabel.text = "other"
break
}
return headerCell!
}