DynamicLayoutViewProtocol

@_spi(FW)
public protocol DynamicLayoutViewProtocol

动态布局视图协议

  • 如果用来确定Cell所需高度的View是唯一的,请把此值设置为YES,可提升一定的性能

    Declaration

    Swift

    var fw_maxYViewFixed: Bool { get set }
  • 最大Y视图的底部内边距(横向时为X),可避免新创建View来撑开Cell,默认0

    Declaration

    Swift

    var fw_maxYViewPadding: CGFloat { get set }
  • 最大Y视图是否撑开布局(横向时为X),需布局约束完整。默认NO,无需撑开布局;YES时padding不起作用

    Declaration

    Swift

    var fw_maxYViewExpanded: Bool { get set }
  • 创建可重用动态布局视图方法

    Declaration

    Swift

    static func fw_dynamicLayoutView() -> Self
  • 获取可重用动态布局视图内容视图

    Declaration

    Swift

    var fw_dynamicLayoutContentView: UIView { get }
  • 准备可重用动态布局视图方法

    Declaration

    Swift

    func fw_dynamicLayoutPrepare()

Available where Self: UIView

  • fw_maxYViewFixed Default implementation

    Default Implementation

    如果用来确定Cell所需高度的View是唯一的,请把此值设置为YES,可提升一定的性能

    Declaration

    Swift

    public var fw_maxYViewFixed: Bool { get nonmutating set }
  • fw_maxYViewPadding Default implementation

    Default Implementation

    最大Y视图的底部内边距(横向时为X),可避免新创建View来撑开Cell,默认0

    Declaration

    Swift

    public var fw_maxYViewPadding: CGFloat { get nonmutating set }
  • fw_maxYViewExpanded Default implementation

    Default Implementation

    最大Y视图是否撑开布局(横向时为X),需布局约束完整。默认NO,无需撑开布局;YES时padding不起作用

    Declaration

    Swift

    public var fw_maxYViewExpanded: Bool { get nonmutating set }
  • fw_dynamicLayoutView() Default implementation

    Default Implementation

    创建可重用动态布局视图方法

    Declaration

    Swift

    public static func fw_dynamicLayoutView() -> Self
  • fw_dynamicLayoutContentView Default implementation

    Default Implementation

    获取可重用动态布局视图内容视图

    Declaration

    Swift

    public var fw_dynamicLayoutContentView: UIView { get }
  • fw_dynamicLayoutPrepare() Default implementation

    Default Implementation

    可重用动态布局视图重用方法

    Declaration

    Swift

    public func fw_dynamicLayoutPrepare()