UITableView 管理方法 Hakuba

码农软件 · 软件分类 · 列表(Table) · 2019-05-25 13:29:39

软件介绍

Hakuba 是管理 UITableView 的新方式。

代码示例

 // viewController swift file
    hakuba = Hakuba(tableView: tableView)
    let cellmodel = YourCellModel(title: "Title", des: "description") {
        println("Did select cell with title = \(title)")
    }
    hakuba[2].append(cellmodel)     // append a new cell model in datasource
             .slide(.Fade)          // show the cell of your cell model in the table view
    hakuba[1].remove(1...3)
             .slide(.Right)
// your cell swift file
    class YourCellModel : MYCellModel {
        let title: String
        let des: String
        init(title: String, des: String, selectionHandler: MYSelectionHandler) {
            self.title = title
            self.des = des
            super.init(YourCell.self, selectionHandler: selectionHandler)
        }
    }
    class YourCell : MYTableViewCell {
        @IBOutlet weak var titleLabel: UILabel!
        override func configureCell(data: MYCellModel) {
            super.configureCell(data)
            if let cellmodel = data as? YourCellModel {
                titleLabel.text = cellmodel.title
            }
        }
    }


本文地址:https://codercto.com/soft/d/6514.html

R语言实战

R语言实战

卡巴科弗 (Robert I.Kabacoff) / 高涛、肖楠、陈钢 / 人民邮电出版社 / 2013-1 / 79.00元

数据时代已经到来,但数据分析、数据挖掘人才却十分短缺。由于“大数据”对每个领域的决定性影响, 相对于经验和直觉,在商业、经济及其他领域中基于数据和分析去发现问题并作出科学、客观的决策越来越重要。开源软件R是世界上最流行的数据分析、统计计算及制图语言,几乎能够完成任何数据处理任务,可安装并运行于所有主流平台,为我们提供了成千上万的专业模块和实用工具,是从大数据中获取有用信息的绝佳工具。  本书从解决......一起来看看 《R语言实战》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具