UIScrollView

class UIScrollView : UIView, NSCoding, UIFocusItemScrollableContainer
  • Deprecated: Please use currentPage instead.

    Refer to the documentation for currentPage for more info.

    Declaration

    Swift

    @available(*, deprecated, renamed: "currentPage")
    public var lsd_currentPage: Int { get }
  • Deprecated: Please use numberOfPages instead.

    Refer to the documentation for numberOfPages for more info.

    Declaration

    Swift

    @available(*, deprecated, renamed: "numberOfPages")
    public var lsd_numberOfPages: Int { get }
  • Deprecated: Please use setCurrentPage(_:, animated:) instead.

    Refer to the documentation for setCurrentPage(_:, animated:) for more info.

    Declaration

    Swift

    @available(*, deprecated, renamed: "setCurrentPage(_:animated:﹚")
    public func lsd_setCurrentPage(_ page: Int, animated: Bool)
  • Gets/Sets (without animation) the current page of the scroll view, assuming a paginated scroll view of width self.bounds.size.width, with no left or right content insets.

    To set the current page with an animation, use setCurrentPage(_ page:, animated:)

    Declaration

    Swift

    public var currentPage: Int { get set }

    Return Value

    Returns the current page (0-based)

  • Gets the total number of pages of the scroll view, assuming a paginated scroll view of width self.bounds.size.width, with no left or right content insets.

    Declaration

    Swift

    public var numberOfPages: Int { get }

    Return Value

    Returns the number of pages.

  • Sets the current page of the scroll view, assuming a paginated scroll view of width self.bounds.size.width, with no left or right content insets.

    Declaration

    Swift

    public func setCurrentPage(_ page: Int, animated: Bool)

    Parameters

    page

    The page to set to.

    animated

    Whether to animate the change or not.