VegaScroll flow layout for UICollectionView
A Scroll flow layout for UICollectionView is a customized implementation of the UICollectionViewFlowLayout class that enables scrolling in both horizontal and vertical directions.
It provides a flexible and dynamic way to display and navigate through a collection of items within a UICollectionView.
Unlike the traditional flow layout, which arranges items in a single direction (either horizontally or vertically), a Scroll flow layout allows items to be arranged in a grid-like fashion and be scrolled in both directions.
This enables a more versatile presentation of content, especially when dealing with large datasets or when you want to create a multi-dimensional grid-like layout.
Implementing a Scroll flow layout involves subclassing the UICollectionViewFlowLayout and modifying certain properties and methods to support scrolling in both directions. You would typically customize the scroll direction property to allow for both horizontal and vertical scrolling.
VegaScroll is a lightweight animation flowlayout for
UICollectionView completely written in Swift 4, compatible with iOS 11 and Xcode 9.
- Supported build target – iOS 9.0
Add the following line in your
If you’re using Carthage you can add a dependency on VegaScroll by adding it to your
let layout = VegaScrollFlowLayout()
collectionView.collectionViewLayout = layout
layout.minimumLineSpacing = 20
layout.itemSize = CGSize(width: collectionView.frame.width, height: 87)
layout.sectionInset = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0)
Also check another flowlayout for UICollectionView: GravitySlider