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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software