RxPullToRefresh

open class RxPullToRefresh : NSObject

A main class for RxPullToRefresh.

  • A RxPullToRefreshPosition value indicating where placed at.

    Declaration

    Swift

    public var position: RxPullToRefreshPosition
  • A TimeInterval value indicating the duration to display an error on failure.

    Declaration

    Swift

    public var waitDurationOnFailure: TimeInterval
  • A Boolean value indicating whether to start loading while dragging. If set to false, loading starts after the user finishes dragging.

    Declaration

    Swift

    public var shouldStartLoadingWhileDragging: Bool
  • A Boolean value indicating whether a scroll view is being dragged.

    Declaration

    Swift

    @objc
    dynamic public internal(set) var isDragging: Bool
  • A Boolean value indicating whether a RxPullToRefresh object is enabled. If set to false, a RxPullToRefresh object will not be displayed regardless of whether a data source exists or not.

    Declaration

    Swift

    @objc
    dynamic public var isEnabled: Bool { get set }
  • A Boolean value indicating whether RxPullToRefresh can load more content. If set to false, the text No Content will be displayed by default.

    Declaration

    Swift

    @objc
    dynamic public var canLoadMore: Bool { get set }
  • A pulling rate of a RxPullToRefreshState object

    Declaration

    Swift

    @objc
    dynamic public internal(set) var progressRate: CGFloat { get set }
  • A RxPullToRefreshState value indicating a pulling state

    Declaration

    Swift

    @objc
    dynamic public internal(set) var state: RxPullToRefreshState { get set }
  • The object that acts as RxPullToRefreshDelegate.

    Declaration

    Swift

    public weak var delegate: RxPullToRefreshDelegate?
  • A customizable UIView which added to a header or a footer.

    Declaration

    Swift

    public internal(set) var refreshView: RxPullToRefreshView!
  • An function that initialize RxPullToRefresh

    Declaration

    Swift

    public init(refreshView: RxPullToRefreshView,
                position: RxPullToRefreshPosition,
                shouldStartLoadingWhileDragging: Bool = true,
                waitDurationOnFailure: TimeInterval = 1.0,
                loadAnimationType: RxPullToRefreshAnimationType = .linear(duration: 0.3),
                backAnimationType: RxPullToRefreshAnimationType = .linear(duration: 1.0))

    Parameters

    refreshView

    A UIView which will added to header or footer view.

    position

    A RxPullToRefreshPosition value indicating a position.

    animationOption

    A RxPullToRefreshPosition value indicating a position.

  • An function that initialize RxPullToRefresh

    Declaration

    Swift

    public convenience init(position: RxPullToRefreshPosition,
                            shouldStartLoadingWhileDragging: Bool = true,
                            waitDurationOnFailure: TimeInterval = 1.0,
                            loadAnimationType: RxPullToRefreshAnimationType = .linear(duration: 0.3),
                            backAnimationType: RxPullToRefreshAnimationType = .linear(duration: 1.0))

    Parameters

    height

    A CGFloat value indicating the RxPullToRefresh height.

    position

    A RxPullToRefreshPosition value indicating a position.

    animationOption

    A RxPullToRefreshPosition value indicating a position.

  • A function to start refreshing forcibly.

    Declaration

    Swift

    func startRefreshing()
  • A function to end refreshing.

    Declaration

    Swift

    func endRefreshing()
  • A function to fail refreshing.

    Declaration

    Swift

    func failRefreshing()