Scrollable

public protocol Scrollable : AnyObject

Defines methods to be implemented by classes that will support scrolling.

  • Gets the maximum scroll position.

    Declaration

    Swift

    func getMaxScrollPos() -> Double

    Return Value

    The maximum scroll position.

  • Gets the current scroll position.

    Declaration

    Swift

    func getCurrentScrollPos() -> Double

    Return Value

    The current scroll position.

  • Sets the current scroll position.

    Declaration

    Swift

    func setCurrentScrollPos(_ pos: Double)

    Parameters

    pos

    The scroll position to set.

  • Gets the height of the caption.

    Declaration

    Swift

    func getCaptionHeight() -> Double

    Return Value

    The caption height.

  • Checks if the scroll mode is integral, which means the scroll step is round numbers.

    Declaration

    Swift

    func integralScrollMode() -> Bool

    Return Value

    true if the scroll mode is integral; otherwise false.

  • Gets the height of the items that are completely visible.

    Declaration

    Swift

    func getHeightOfCompletelyVisibleItems() -> Double

    Return Value

    The height.

  • Gets the index of the last visible item.

    Declaration

    Swift

    func getNumberOfLastVisibleItems() -> Int

    Return Value

    the index.

  • Gets the count of the items.

    Declaration

    Swift

    func getItemsNumber() -> Int

    Return Value

    The item count.