Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

argon/ANDistributedFlowLayout

Open more actions menu
 
 

Repository files navigation

ANDistributedFlowLayout

ANDistributedFlowLayout is a subclass of UICollectionViewFlowLayout which distributes cells evenly in across each row.

Usage

# In your Podfile

pod 'ANDistributedFlowLayout'

Objective-C:

ANDistributedFlowLayout *layout = [ANDistributedFlowLayout new];
layout.minimumInteritemSpacing = 10.f;
layout.minimumLineSpacing = 10.f;

[[UICollectionViewController alloc] initWithCollectionViewLayout:layout];

Swift:

let layout = ANDistributedFlowLayout()
layout.minimumInteritemSpacing = 10.0
layout.minimumLineSpacing = 10.0

UICollectionViewController(collectionViewLayout: layout)

Example

See the layout in use in the ./Example app:

About

Aligns collection view cells to the center of the screen.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 92.4%
  • Ruby 7.6%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.