您的位置:首页 > 移动开发 > Swift

Swift 写纯洁的TableviewCell

2016-12-14 10:09 375 查看
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!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: