- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/nghialv/Hakuba
软件介绍
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
}
}
}数据结构与算法JavaScript描述
[美] Michael McMillan / 王群锋、杜 欢 / 人民邮电出版社 / 2014-8 / 49.00元
通过本书的学习,读者将能自如地选择最合适的数据结构与算法,并在JavaScript开发中懂得权衡使用。此外,本书也概述了与数据结构与算法相关的JavaScript特性。 本书主要内容如下。 数组和列表:最常用的数据结构。 栈和队列:与列表类似但更复杂的数据结构。 链表:如何通过它们克服数组的不足。 字典:将数据以键-值对的形式存储。 散列:适用于快速查找和检索。......一起来看看 《数据结构与算法JavaScript描述》 这本书的介绍吧!
