Skip to content

About

This is a sample of a Centered CollectionView Flow Layout

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Sample of a Centered CollectionView Flow Layout

This is a sample of a Centered CollectionView Flow Layout, that is in detail explaing in my blog post here.

The result of the layout looks like:

CenteredCollectionViewFlowLayout

Usage

Just initialize the UICollectionViewCenterLayout object and set it as the collectionViewLayout of your UICollectionView:

let layout = UICollectionViewCenterLayout()
layout.estimatedItemSize = CGSize(width: 140, height: 40)
collectionView.collectionViewLayout = layout

About

This is a sample of a Centered CollectionView Flow Layout

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages