<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          HakubaUITableView 管理方法

          聯(lián)合創(chuàng)作 · 2023-09-25 23:57

          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
                      }
                  }
              }

           

          瀏覽 19
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  97AV视频 | 日日操大香蕉 | 亚洲日韩欧美在线观看 | 成人MV在线 | 精精品人妻一区二区三区 |