ScrollViewControllerProtocol

@MainActor
public protocol ScrollViewControllerProtocol : ViewControllerProtocol

滚动视图控制器协议,可覆写

  • 滚动视图,默认不显示滚动条

    Declaration

    Swift

    @MainActor
    var scrollView: UIScrollView { get }
  • 内容容器视图,自动撑开,子视图需要添加到此视图上

    Declaration

    Swift

    @MainActor
    var contentView: UIView { get }
  • 渲染滚动视图,setupSubviews之前调用,默认空实现

    Declaration

    Swift

    @MainActor
    func setupScrollView()
  • 渲染滚动视图布局,setupSubviews之前调用,默认铺满

    Declaration

    Swift

    @MainActor
    func setupScrollLayout()

Available where Self: UIViewController

  • scrollView Default implementation

    Default Implementation

    滚动视图,默认不显示滚动条

    Declaration

    Swift

    @MainActor
    public var scrollView: UIScrollView { get }
  • contentView Default implementation

    Default Implementation

    内容容器视图,自动撑开,子视图需要添加到此视图上

    Declaration

    Swift

    @MainActor
    public var contentView: UIView { get }
  • setupScrollView() Default implementation

    Default Implementation

    渲染滚动视图,setupSubviews之前调用,默认空实现

    Declaration

    Swift

    @MainActor
    public func setupScrollView()
  • setupScrollLayout() Default implementation

    Default Implementation

    渲染滚动视图布局,setupSubviews之前调用,默认铺满

    Declaration

    Swift

    @MainActor
    public func setupScrollLayout()