Index

RBScrollView.swift

Protocols

Classes


RBScrollView

A UIScrollView with extensions.

Properties

A collection of RBScrollViewObserver objects to receive scroll view events.
public var observers RBObserverCollection { get }

Whether or not the scroll view should force scroll to be enabled - even if it's not required to access the content. Such as when you need a pull-to-refresh.
public var shouldForceScrollEnabled Bool { get set }

public var topExtendView RBExtendView? { get set }

public var bottomExtendView RBExtendView? { get set }

public var leftExtendView RBExtendView? { get set }

public var rightExtendView RBExtendView? { get set }

public var haveExtendViews Bool { get }

The current vector of change in the current scroll.
public var currentScrollVector CGVector { get }

The vector of change in the previous scroll operation.
public var lastScrollUpdateVector CGVector { get }

The frame within the content that is currently in view (in the viewport).
public var visibleContentFrame CGRect { get }

The frame within the bounds where the content is visible.
public var contentViewport CGRect { get }

Functions

public func scrollViewDidScroll(_ scrollView: UIScrollView)

public func scrollViewDidZoom(_ scrollView: UIScrollView)

public func scrollViewWillBeginDragging(_ scrollView: UIScrollView)

public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>)

public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool)

public func scrollViewWillBeginDecelerating(_ scrollView: UIScrollView)

public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView)

public func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView)

public func viewForZooming(in scrollView: UIScrollView) -> UIView?

public func scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?)

public func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat)

public func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool

public func scrollViewDidScrollToTop(_ scrollView: UIScrollView)

public func scrollViewDidChangeAdjustedContentInset(_ scrollView: UIScrollView)

Sets an extend view for a specific position. Note extend views manage and set contentInsets and contentOffsets.
public func setExtendView(extendView: RBExtendView?, position: RBExtendViewPosition)

public func extendEndEvent()

Called when the scroll view is tapped anywhere.
open func scrollViewWasTapped()

Called when a scroll operation will begin.
@param origin : The content origin at the start of the scroll operation.
open func willBeginScroll(atOrigin origin: CGPoint)

Called when the scroll operation did update to the given content offset.
@param origin : The current content offset of the scroll operation.
@param fromOrigin : The original content offset of the scroll operation.
open func didScroll(toOrigin origin: CGPoint, fromOrigin: CGPoint)

Called when the user stopped the dragging interaction part of the scroll.
@param willDecelerate : Whether or not the scroll will continue in deceleration mode.
open func didEndDragging(_ willDecelerate: Bool)

Called when a scroll operation has finished.
@param origin : The final content offset of the scroll operation.
@param fromOrigin : The original content offset of the scroll operation.
open func didFinishScroll(toOrigin origin: CGPoint, fromOrigin: CGPoint)

open func visibleContentFrameDidChange()