UI: 表视图 Cell ,20160830

UI: 表视图 Cell,老子真厉害。

√ √ √

class func createCatalogCellWithTableView(tableView: UITableView, atIndexPath indexPath: NSIndexPath, withModel models: Array ) -> 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 ) -> 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         
        
        }

你可能感兴趣的:(UI: 表视图 Cell ,20160830)