Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 631 Bytes

API.md

File metadata and controls

20 lines (16 loc) · 631 Bytes

CenteredCollectionViewFlowLayout API

You can use all properties inherited from UICollectionViewFlowLayout.

CenteredCollectionViewFlowLayout specific properties:

  • currentCenteredPage calculates the current centered page

    var currentCenteredPage: Int? { get }
  • scrollDirection direction of scrolling (supports vertical)

    var scrollDirection: UICollectionView.ScrollDirection { get set }
    // default: .horizontal
  • scrollTo(index: animated:) programmatically scrolls to a item at a specified index.

    func scrollTo(index: Int, animated: Bool)