UIScrollView

extension UIScrollView
  • Equivalent to implementing UIScrollView’s scrollViewDidScroll(_:) method

    Declaration

    Swift

    @discardableResult
    public func didScroll(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewDidZoom(_:) method

    Declaration

    Swift

    @discardableResult
    public func didZoom(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewWillBeginDragging(_:) method

    Declaration

    Swift

    @discardableResult
    public func willBeginDragging(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewWillEndDragging(_:) method

    Declaration

    Swift

    @discardableResult
    public func willEndDragging(handler: @escaping (_ scrollView: UIScrollView, _ velocity: CGPoint, _ targetContentOffset: UnsafeMutablePointer<CGPoint>) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewDidEndDragging(_:) method

    Declaration

    Swift

    @discardableResult
    public func didEndDragging(handler: @escaping (_ scrollView: UIScrollView, _ decelerate: Bool) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewWillBeginDecelerating(_:) method

    Declaration

    Swift

    @discardableResult
    public func willBeginDecelerating(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewDidEndDecelerating(_:) method

    Declaration

    Swift

    @discardableResult
    public func didEndDecelerating(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewDidEndScrollingAnimation(_:) method

    Declaration

    Swift

    @discardableResult
    public func didEndScrollingAnimation(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s viewForZooming(_:) method

    Declaration

    Swift

    @discardableResult
    public func viewForZoomingIn(handler: @escaping (_ scrollView: UIScrollView) -> UIView?) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewWillBeginZooming(_:) method

    Declaration

    Swift

    @discardableResult
    public func willBeginZooming(handler: @escaping (_ scrollView: UIScrollView, _ view: UIView?) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewDidEndZooming(_:) method

    Declaration

    Swift

    @discardableResult
    public func didEndZooming(handler: @escaping (_ scrollView: UIScrollView, _ view: UIView?, _ scale: CGFloat) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewShouldScrollToTop(_:) method

    Declaration

    Swift

    @discardableResult
    public func shouldScrollToTop(handler: @escaping (_ scrollView: UIScrollView) -> Bool) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewDidScrollToTop(_:) method

    Declaration

    Swift

    @discardableResult
    public func didScrollToTop(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Equivalent to implementing UIScrollView’s scrollViewDidChangeAdjustedContentInset(_:) method

    Declaration

    Swift

    @discardableResult
    public func didChangeAdjustedContentInset(handler: @escaping (_ scrollView: UIScrollView) -> Void) -> Self

    Parameters

    handler

    The closure that will be called in place of its equivalent delegate method

    Return Value

    itself so you can daisy chain the other delegate calls

  • Clears any delegate closures that were assigned to this UIScrollView. This cleans up memory as well as sets the delegate property to nil. This is typically only used for explicit cleanup. You are not required to call this method.

    Declaration

    Swift

    @objc
    public func clearClosureDelegates()