Instance Property

scrollDirection

The scroll direction of the grid.

Declaration

var scrollDirection: UICollectionView.ScrollDirection { get set }

Discussion

The grid layout scrolls along one axis only, either horizontally or vertically. For the non scrolling axis, the width of the collection view in that dimension serves as starting width of the content.

The default value of this property is UICollectionView.ScrollDirection.vertical.