UI: 表视图 Cell,老子真厉害。
√ √ √
√
class func createCatalogCellWithTableView(tableView: UITableView, atIndexPath indexPath: NSIndexPath, withModel models: Array<HFDataCatalogModel> ) -> FirstPageCatalogTableViewCell {
let cellId = "catalogCellId"
var cell = tableView.dequeueReusableCellWithIdentifier(cellId) as? FirstPageCatalogTableViewCell
if cell == nil {
cell = NSBundle.mainBundle().loadNibNamed("FirstPageCatalogTableViewCell", owner: nil, options: nil).last as? FirstPageCatalogTableViewCell
}
Ò Ò Ò Ò
错的
class func createCatalogCellWithTableView(tableView: UITableView, atIndexPath indexPath: NSIndexPath, withModel models: Array<HFDataCatalogModel> ) -> FirstPageCatalogTableViewCell {
let cellId = "catalogCellId"
var cell = tableView.dequeueReusableCellWithIdentifier(cellId) as? FirstPageCatalogTableViewCell
if cell == nil {
cell = NSBundle.mainBundle().loadNibNamed("catalogCellId", owner: nil, options: nil).last as? FirstPageCatalogTableViewCell
}