You can use all properties inherited from UICollectionViewFlowLayout
.
CenteredCollectionViewFlowLayout specific properties:
-
currentCenteredPage
calculates the current centered pagevar 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)