Skip to content

uny/UICollectionViewLeftAlignedLayout

This branch is 17 commits behind mokagio/UICollectionViewLeftAlignedLayout:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

83fd602 · Feb 13, 2016

History

33 Commits
Nov 4, 2015
Jan 31, 2016
Jan 31, 2016
Jan 31, 2016
Apr 21, 2014
Apr 22, 2014
Feb 13, 2016
Apr 21, 2014

Repository files navigation

UICollectionView Left Aligned Layout

A UICollectionViewLayout implementation that aligns the cells to the left.

Check out the twin project UICollectionViewRightAlignedLayout

Installation with CocoaPods

platform :ios, '6.0'

pod 'UICollectionViewLeftAlignedLayout'

Usage

Simply set UICollectionViewLeftAlignedLayout as the layout object for your collection view either via code:

CGRect frame = ...
UICollectionViewLeftAlignedLayout *layout = [UICollectionViewLeftAlignedLayout alloc] init];
UICollectionView *leftAlignedCollectionView = [[UICollectionView alloc] initWithFrame:frame collectionViewLayout:layout];

or from Interface Builder:

img needed here

UICollectionViewLeftAlignedLayout is a subclass of UICollectionViewFlowLayout, so your collection view delegate can use all the delegate methods of UICollectionViewDelegateFlowLayout.

For those of you who like consistency there is an UICollectionViewDelegateLeftAlignedLayout protocol that your delegate object can conform to. Is nothing more than an empty extension of UICollectionViewDelegateFlowLayout.

License

UICollectionViewLeftAlignedLayout is released under the MIT license.


Hacked together with passion by @mokagio

About

A layout for UICollectionView that aligns the cells to the left.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 78.4%
  • Shell 14.8%
  • Ruby 3.8%
  • C 3.0%