MWTableViewCellSeparatorLineSwift 0.1.1

MWTableViewCellSeparatorLineSwift 0.1.1

LiY 维护。



  • LiY

Swift 版的 UITableViewCell 分割线

CI Status Version License Platform

说明

Swift 版本的 UITableViewCell 分割线

使用

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    // ...
    cell.setSeparatorLineStyle([.display(.show(l: 0, r: 20)), .color(UIColor.red), .height(0.5)])
    
    // 或者颜色使用字符串形式
    // .color("#3125FF")
}

注意

  • 如果 UITableView 设置了 Stylegrouped,仍然会有上下两条线,需要设置
tableView.separatorStyle = .none

安装

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

pod 'MWTableViewCellSeparatorLineSwift'

作者

LiY, [email protected]

许可

MWTableViewCellSeparatorLineSwift 在 MIT 许可下可用。更多信息请查看 LICENSE 文件。