ArrayResultBuilderCompatible

public protocol ArrayResultBuilderCompatible

UIView兼容ArrayResultBuilder

Available where Self: UIView

  • init(frame:_:) Extension method

    初始化并批量配置子视图

    Declaration

    Swift

    @MainActor
    public init(
        frame: CGRect = .zero,
        @ArrayResultBuilder<UIView> _ items: () -> [UIView]
    )
  • arrangeSubviews(_:) Extension method

    批量配置子视图,支持链式调用

    Declaration

    Swift

    @discardableResult
    @MainActor
    public func arrangeSubviews(
        @ArrayResultBuilder<UIView> _ items: () -> [UIView]
    ) -> Self
  • arrangeLayout(_:) Extension method

    调用布局句柄,支持链式调用

    Declaration

    Swift

    @discardableResult
    @MainActor
    public func arrangeLayout(
        _ block: (Self) -> Void
    ) -> Self