Swift 写纯洁的TableviewCell
2016-12-14 10:09 Y了个J 阅读(232) 评论(0) 编辑 收藏 举报let initIdentifier = "员工"
var cell = tableView.dequeueReusableCell(withIdentifier: initIdentifier);
if (cell == nil)
{
cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: initIdentifier)
}
let model:EmployeeModel = (self.data![indexPath.row] as EmployeeModel);
cell?.textLabel?.text = model.employeeName;
cell?.textLabel?.textColor = UIColor.init(colorLiteralRed: 66/255.0, green: 174/255.0, blue: 211/255.0, alpha: 1.0);
cell?.textLabel?.font = UIFont.systemFont(ofSize: 20);
return cell!