BFTableView 0.9.0

BFTableView 0.9.0

Antons Aleksandrovs 维护。



BFTableView

Version License Platform

示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

用法

使用 pod 并在代码中永远不要使用表格视图单元格标识符。您需要在Storyboard中设置cell标识符并命名为与cell类同名。然后只需将表格视图单元格转换为自定义类,就无需再担心cell标识符了。

使用它!

import BFTableView
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCell(forIndexPath: indexPath) as ExampleCell

    cell.titleLabel.text = "Hello from BFTableView!"

    return cell
}

不要忘记将单元格标识符命名为您的自定义单元格类。(例如:ExampleCell)

class ExampleCell: UITableViewCell {

    @IBOutlet weak var titleLabel: UILabel!
}

安装

BFTableView可以通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中

pod 'BFTableView'

作者

Antons Aleksandrovs, [email protected]

许可证

BFRating受MIT许可证的约束。有关更多信息,请参阅LICENSE文件。