UIScrollView

class UIScrollView : UIView, NSCoding
  • Scrolls the rect to the center of the scrollview.

    Declaration

    Swift

    public func scrollToCentered(_ rect: CGRect, animated: Bool)

    Parameters

    rect

    Rect or frame to scroll to.

    animated

    Flag to animate the scroll.

  • Boolean function determining if scrollview has scrolled past a given threshold.

    Declaration

    Swift

    public func scrolledPastThreshold(_ percentageThreshold: CGFloat) -> Bool

    Parameters

    percentageThreshold

    Threshold percentage.

    Return Value

    True, if scrolled past, false otherwise.