测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布上次发布 | 2016 年 3 月 |
由 Takayoshi Miyamoto 维护。
MoreLoadTableView 是一个更强大的 UITableView。
MoreLoadTableView 可在 cocoapods 上使用。
pod 'MoreLoadTableView'
或者,将 MoreLoadTableView 类包含到您的项目中。
导入头文件。
#import "MoreLoadTableView.h"
@IBOutlet weak var tableView: MoreLoadTableView!
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.moreDataSource = self
self.tableView.moreDelegate = self
self.tableView.showSectionCount = 1
self.tableView.showRowCount = 7
}
// MARK: - MoreLoadTableViewDataSource
func numberOfSectionsInMoreLoadTableView(tableView: MoreLoadTableView!) -> Int {
return 4
}
func moreLoadTableView(tableView: MoreLoadTableView!, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 4
}
else if section == 1 {
return 3
}
else if section == 2 {
return 10
}
else if section == 3 {
return 23
}
return 0
}
func initializeTableViewCellForRowAtIndexPath(indexPath: NSIndexPath!) -> UITableViewCell! {
var cell = self.tableView.dequeueReusableCellWithIdentifier("Cell")
if cell == nil {
cell = tableView.dequeueReusableCellWithIdentifier("Cell")
}
return cell
}
func moreLoadTableViewCell(cell: AutoreleasingUnsafeMutablePointer<UITableViewCell?>, cellForRowAtIndexPath indexPath: NSIndexPath!) {
cell.memory!.textLabel.text = "\(indexPath.section) : \(indexPath.row)"
}
// MARK: - MoreLoadTableViewDelegate
func moreLoadTableView(tableView: MoreLoadTableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) {
}
此 MoreLoadTableView 采用 MIT 许可证发布。有关详细信息,请参阅 LICENSE。