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!
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!
相关文章推荐
- Swift实现自定义TableViewCell
- Swift 实现简单自定义TableViewCell
- swift和storyborad环境下通过xib自定义TableViewCell
- tableviewcell 单个选中状态(swift)
- 创建纯洁的TableViewCell
- swift下完成tableviewCell的注册创建
- 【swift】自定义xib 的tableviewcell的使用
- iOS8实现滑动TableViewCell自定义Actions-Swift基础教程
- iOS.swift 纯代码 关于如何提取TableViewCell视图作为view
- Swift锋芒毕露 无脑意译
- ios深度解析之Swift(函数)
- Swift方法嵌套
- swift 闭包 tips
- Swift字符串的介绍
- [Swift 开发] Swift UIScrollView
- swift闭包的理解
- Swift 封装UIView
- OC与Swift混编之Swift中使用OC
- swift创建tableview
- 用Swift实现汉诺塔算法