- Notifications
You must be signed in to change notification settings - Fork85
A library that implements custom flow layouts for iOS apps
License
rubygarage/collection-view-layouts
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Collection View Layouts is a set of custom layouts for iOS which imitate general data grid approaches for mobile apps.
Tags | 500px | ||
![]() | ![]() | ![]() | ![]() |
Flickr | |||
![]() | ![]() | ![]() |
- 7 popular layouts for iOS collection view
- Tags and Flipboard layouts support left and right content align
- 500px has custom cells layout configuration
- Three modes for Instagram layout (default grid mode, one preview cell, regular preview cell)
- Each layout can be configured with content and cells paddings separately
- Tests coverage more than 90%
Collection View Layouts is available throughCocoaPods. To install it, simply add the following lines (depends on your needs) to yourPodfile
:
pod'collection-view-layouts/Core'pod'collection-view-layouts/TagsLayout'pod'collection-view-layouts/PinterestLayout'pod'collection-view-layouts/Px500Layout'pod'collection-view-layouts/InstagramLayout'pod'collection-view-layouts/FlipboardLayout'pod'collection-view-layouts/FacebookLayout'pod'collection-view-layouts/FlickrLayout'
iOS: 11.0+
Swift: 5.0
CocoaPods: for iOS
To run the example project, clone the repo, and run pod install from the Example directory first.
Configuration of custom layouts is pretty easy:
varlayout:BaseLayout=TagsLayout()layout.delegate=selflayout.delegate=ItemsPadding(horizontal:10, vertical:10)layout.cellsPadding=ItemsPadding(horizontal:8, vertical:8)collectionView.collectionViewLayout= layoutcollectionView.reloadData()
Also, you have to implement LayoutDelegate protocol:
publicprotocolLayoutDelegate:class{func cellSize(indexPath:IndexPath)->CGSize}func cellSize(indexPath:IndexPath)->CGSize{returncellsSizes[indexPath.row]}
Sergey Afanasiev
sergey.afanasiev@rubygarage.org
Collection View Layouts is licensed under theApache 2.0 license
RubyGarage is a leading software development and consulting company in Eastern Europe. Our main expertise includes Ruby and Ruby on Rails, but we successfuly employ other technologies to deliver the best results to our clients.Check out our portoflio for even more exciting works!
About
A library that implements custom flow layouts for iOS apps
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.