UI: 表视图 Cell ,20160830

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         
        
        }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 2017.02.22 可以练习,每当这个时候,脑袋就犯困,我这脑袋真是神奇呀,一说让你做事情,你就犯困,你可不要太...
    Carden阅读 1,378评论 0 1
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 12,259评论 4 61
  • 视图控制器管理着构成应用程序用户界面中的一部分视图,其负责加载和处理这些视图,管理与这些视图的交互,并协调视图对其...
    渐z阅读 4,359评论 0 1
  • 20年来火影忍者给我们带来了快乐,就算如今鸣人死了,他也永远活在我们心中!向鸣人敬礼!
    张家之才阅读 240评论 0 1
  • 作为全球领先的商业创新机构, IDEO 公司一直在产品设计研究和品牌策略锻造上有自己独特的方法和理论。下面的内容是...
    MrTron阅读 790评论 0 0