You can use all properties inherited from UICollectionViewFlowLayout.
CenteredCollectionViewFlowLayout specific properties:
-
currentCenteredPagecalculates the current centered pagevar currentCenteredPage: Int? { get }
-
scrollDirectiondirection 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)