InfiniteScrollView
@MainActor
open class InfiniteScrollView : UIView
上拉追加视图,默认高度60
-
全局高度设置
Declaration
Swift
@MainActor public static var height: CGFloat
-
当前高度,默认全局高度
Declaration
Swift
@MainActor open var height: CGFloat { get set }
-
是否启用,默认true
Declaration
Swift
@MainActor open var enabled: Bool
-
原始边距
Declaration
Swift
@MainActor open var originalInset: UIEdgeInsets
-
预加载高度,默认0
Declaration
Swift
@MainActor open var preloadHeight: CGFloat
-
指示器颜色
Declaration
Swift
@MainActor open var indicatorColor: UIColor? { get set }
-
指示器偏移
Declaration
Swift
@MainActor open var indicatorPadding: CGFloat { get set }
-
是否显示完成视图,默认true
Declaration
Swift
@MainActor open var showsFinishedView: Bool
-
自定义完成视图偏移
Declaration
Swift
@MainActor open var finishedPadding: CGFloat
-
是否是用户触发
Declaration
Swift
@MainActor open var userTriggered: Bool
-
自定义状态改变句柄
Declaration
Swift
@MainActor open var stateBlock: ((_ view: InfiniteScrollView, _ state: InfiniteScrollState) -> Void)?
-
自定义进度句柄
Declaration
Swift
@MainActor open var progressBlock: ((_ view: InfiniteScrollView, _ progress: CGFloat) -> Void)?
-
自定义完成句柄
Declaration
Swift
@MainActor open var finishedBlock: ((_ view: InfiniteScrollView, _ finished: Bool) -> Void)?
-
自定义数据是否为空句柄,返回true时不显示finishedView
Declaration
Swift
@MainActor open var emptyDataBlock: ((_ scrollView: UIScrollView) -> Bool)?
-
自定义上拉追加句柄
Declaration
Swift
@MainActor open var infiniteScrollBlock: (() -> Void)?
-
自定义上拉追加目标和动作
Declaration
Swift
@MainActor open weak var target: AnyObject?
-
Undocumented
Declaration
Swift
@MainActor open var action: Selector?
-
绑定滚动视图
Declaration
Swift
@MainActor open weak var scrollView: UIScrollView?
-
是否已监听
Declaration
Swift
@MainActor open var isObserving: Bool
-
是否已完成追加
Declaration
Swift
@MainActor open var finished: Bool { get set }
-
数据是否为空,为空时始终隐藏finishedView。默认自动判断totalDataCount,可自定义
Declaration
Swift
@MainActor open var isDataEmpty: Bool { get }
-
上拉追加状态
Declaration
Swift
@MainActor open var state: InfiniteScrollState { get set }
-
完成视图
Declaration
Swift
@MainActor open lazy var finishedView: UIView { get set }
-
指示器视图
Declaration
Swift
@MainActor open lazy var indicatorView: UIView & IndicatorViewPlugin { get set }
-
完成文本标签
Declaration
Swift
@MainActor open lazy var finishedLabel: UILabel { get set }
-
Undocumented
Declaration
Swift
@MainActor override public init(frame: CGRect)
-
Undocumented
Declaration
Swift
@MainActor public required init?(coder: NSCoder)
-
Undocumented
Declaration
Swift
@MainActor override open func willMove(toSuperview newSuperview: UIView?)
-
Undocumented
Declaration
Swift
@MainActor override open func layoutSubviews()
-
Undocumented
Declaration
Swift
override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
-
拖动手势状态监听回调方法
Declaration
Swift
@objc @MainActor open func gestureRecognizerStateChanged(_ gestureRecognizer: UIPanGestureRecognizer)
-
重置滚动视图contentInset
Declaration
Swift
@MainActor open func resetScrollViewContentInset(animated: Bool = true)
-
设置滚动视图contentInset到追加位置
Declaration
Swift
@MainActor open func setScrollViewContentInsetForInfiniteScrolling(animated: Bool = true)
-
自定义各状态的视图
Declaration
Swift
@MainActor open func setCustomView(_ view: UIView?, for state: InfiniteScrollState)
-
自定义动画视图,自动绑定上拉追加动画
Declaration
Swift
@MainActor open func setAnimationView(_ animationView: UIView & ProgressViewPlugin & IndicatorViewPlugin)
-
开始追加动画
Declaration
Swift
@MainActor open func startAnimating()
-
停止动画
Declaration
Swift
@MainActor open func stopAnimating()
-
是否正在执行动画
Declaration
Swift
@MainActor open var isAnimating: Bool { get }