UITableViewCell

extension UITableViewCell: SkeletonViewDelegate
@_spi(FW) extension UITableViewCell: DynamicLayoutViewProtocol

UITableViewCell骨架屏视图代理扩展

StatisticalViewProtocol

UITableViewCell+DynamicLayout

  • 免注册创建UITableViewCell,内部自动处理缓冲池,可指定style类型和reuseIdentifier

    Declaration

    Swift

    public static func fw_cell(
        tableView: UITableView,
        style: UITableViewCell.CellStyle = .default,
        reuseIdentifier: String? = nil
    ) -> Self
  • 根据配置自动计算cell高度,可指定key使用缓存,子类可重写

    Declaration

    Swift

    public static func fw_height(
        tableView: UITableView,
        cacheBy key: AnyHashable? = nil,
        configuration: (UITableViewCell) -> Void
    ) -> CGFloat

UITableViewCell+UIKit

  • 设置分割线内边距,iOS8+默认15.f,设为UIEdgeInsetsZero可去掉

    Declaration

    Swift

    public var fw_separatorInset: UIEdgeInsets { get set }
  • 调整imageView的位置偏移,默认zero不生效,仅支持default|subtitle样式

    Declaration

    Swift

    public var fw_imageEdgeInsets: UIEdgeInsets { get set }
  • 调整textLabel的位置偏移,默认zero不生效,仅支持default|subtitle样式

    Declaration

    Swift

    public var fw_textEdgeInsets: UIEdgeInsets { get set }
  • 调整detailTextLabel的位置偏移,默认zero不生效,仅支持subtitle样式

    Declaration

    Swift

    public var fw_detailTextEdgeInsets: UIEdgeInsets { get set }
  • 调整accessoryView的位置偏移,默认zero不生效,仅对自定义accessoryView生效

    Declaration

    Swift

    public var fw_accessoryEdgeInsets: UIEdgeInsets { get set }
  • 获取当前所属tableView

    Declaration

    Swift

    public weak var fw_tableView: UITableView? { get }
  • 获取当前显示indexPath

    Declaration

    Swift

    public var fw_indexPath: IndexPath? { get }
  • 执行所属tableView的批量更新

    Declaration

    Swift

    public func fw_performBatchUpdates(
        _ updates: ((UITableView, IndexPath?) -> Void)?,
        completion: ((UITableView, IndexPath?, Bool) -> Void)? = nil
    )