All Projects → chiahsien → Chtcollectionviewwaterfalllayout

chiahsien / Chtcollectionviewwaterfalllayout

Licence: mit
The waterfall (i.e., Pinterest-like) layout for UICollectionView.

Programming Languages

objective c
16641 projects - #2 most used programming language
swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Chtcollectionviewwaterfalllayout

Bouncylayout
Make. It. Bounce.
Stars: ✭ 4,035 (-5.9%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Collectionkit
Reimagining UICollectionView
Stars: ✭ 4,153 (-3.15%)
Mutual labels:  uicollectionviewlayout, uicollectionview
CollectionLayouts
A collection of UICollectionViewLayouts
Stars: ✭ 64 (-98.51%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CSStickyFlowLayoutHeaders
UICollectionView replacement for your amazing headers
Stars: ✭ 16 (-99.63%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Uicollectionviewflexlayout
A drop-in replacement for UICollectionViewFlowLayout
Stars: ✭ 277 (-93.54%)
Mutual labels:  uicollectionviewlayout, uicollectionview
CollectionViewMultiColumnLayout
A tiled waterfal/mosaic UICollectionViewLayout with support for explicit columns.
Stars: ✭ 13 (-99.7%)
Mutual labels:  uicollectionview, uicollectionviewlayout
ScaledCenterCarousel
A carousel-based layout for UICollectionView with scaled center item.
Stars: ✭ 16 (-99.63%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Squaremosaiclayout
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations 🔶
Stars: ✭ 243 (-94.33%)
Mutual labels:  uicollectionviewlayout, uicollectionview
iOSEasyList
A data-driven UICollectionView and UITableView framework for building fast and flexible lists
Stars: ✭ 29 (-99.32%)
Mutual labels:  uicollectionview, uicollectionviewlayout
ScrollAnimationShowcase
[ING] - UIScrollViewやUICollectionViewの特性を活用した表現サンプル
Stars: ✭ 15 (-99.65%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CPCollectionViewWheelLayout
An interesting wheel layout of collection view.Swift version:https://github.com/ParsifalC/CPCollectionViewKit
Stars: ✭ 16 (-99.63%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Wslwaterflowlayout
功能描述:WSLWaterFlowLayout 是在继承于UICollectionViewLayout的基础上封装的控件, 目前支持竖向瀑布流(item等宽不等高、支持头脚视图)、水平瀑布流(item等高不等宽 不支持头脚视图)、竖向瀑布流( item等高不等宽、支持头脚视图)、栅格布局瀑布流 4种样式的瀑布流布局。
Stars: ✭ 308 (-92.82%)
Mutual labels:  uicollectionviewlayout, uicollectionview
JQCollectionViewAlignLayout
A custom layout object based on flow layout. Added supports for horizontal, vertical alignment and RTL direction of collection view items.(available for both UICollectionView and NSCollectionView)
Stars: ✭ 69 (-98.39%)
Mutual labels:  uicollectionview, uicollectionviewlayout
ExcelCollectionViewLayout
An Excel-like UICollectionView's layout.
Stars: ✭ 32 (-99.25%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CPCollectionViewWheelLayoutSwift
New url:https://github.com/ParsifalC/CPCollectionViewKit Objective-C Version:https://github.com/ParsifalC/CPCollectionViewWheelLayout
Stars: ✭ 16 (-99.63%)
Mutual labels:  uicollectionview, uicollectionviewlayout
HorizontalStickyHeaderLayout
Horizontal UICollectionViewLayout with Sticky HeaderView
Stars: ✭ 70 (-98.37%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Chatlayout
ChatLayout is an alternative solution to MessageKit. It uses custom UICollectionViewLayout to provide you full control over the presentation as well as all the tools available in UICollectionView. It supports dynamic cells and supplementary view sizes.
Stars: ✭ 184 (-95.71%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Admozaiccollectionviewlayout
ADMozaicCollectionViewLayout is yet another UICollectionViewLayout subclass that implements "brick", "mozaic" or Pinterest style layout.
Stars: ✭ 226 (-94.73%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Transfiguration
Mystical way to transform data into reusable view in Swift
Stars: ✭ 14 (-99.67%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Swiftdatatables
A Swift Data Table package, display grid-like data sets in a nicely formatted table for iOS. Subclassing UICollectionView that allows ordering, and searching with extensible options.
Stars: ✭ 287 (-93.31%)
Mutual labels:  uicollectionviewlayout, uicollectionview

CHTCollectionViewWaterfallLayout

Carthage compatible Swift Package Manager compatible Version Platform Build Status

CHTCollectionViewWaterfallLayout is a subclass of UICollectionViewLayout, and it trys to imitate UICollectionViewFlowLayout's usage as much as possible.

This layout is inspired by Pinterest.

Screen Shots

2 columns

Features

  • Easy to use, it tries to imitate UICollectionViewFlowLayout's usage as much as possible.
  • Highly customizable.
  • Outstanding performance, try 10,000+ items and see the smoothness for yourself.
  • Support header and footer views.
  • Different column counts in different sections.

Requirements

  • iOS 9+ / tvOS 9+
  • Objective-C or Swift 4.2

How to install

  • CocoaPods

    • Add pod 'CHTCollectionViewWaterfallLayout' to your Podfile.
    • If you prefer Objective-C, pod 'CHTCollectionViewWaterfallLayout/ObjC' is ready for you.
  • Carthage

    • Add github chiahsien/CHTCollectionViewWaterfallLayout to your Cartfile.
  • Swift Package Manager

    • Add it to the dependencies value of your Package.swift.
    dependencies: [
      .package(url: "https://github.com/chiahsien/CHTCollectionViewWaterfallLayout.git", from: "0.9.9")
    ]
    
  • Manual

    • Copy CHTCollectionViewWaterfallLayout.h/m or CHTCollectionViewWaterfallLayout.swift to your project.

How to Use

Read the demo codes and CHTCollectionViewWaterfallLayout.h header file for more information.

Step 1

Below lists the properties for you to customize the layout. Although they have default values, I strongly recommend you to set up at least the columnCount property to suit your needs. The itemRenderDirection property is an enum which decides the order in which your items will be rendered in subsequent rows. For eg. Left-Right | Right-Left | Shortest column filling up first.

@property (nonatomic, assign) NSInteger columnCount;
@property (nonatomic, assign) CGFloat minimumColumnSpacing;
@property (nonatomic, assign) CGFloat minimumInteritemSpacing;
@property (nonatomic, assign) CGFloat headerHeight;
@property (nonatomic, assign) CGFloat footerHeight;
@property (nonatomic, assign) UIEdgeInsets sectionInset;
@property (nonatomic, assign) ItemRenderDirection itemRenderDirection;

Step 2

Your collection view's delegate (which often is your view controller) must conforms to CHTCollectionViewDelegateWaterfallLayout protocol and implements the required method, all you need to do is return the original size of the item:

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath;

Limitation

  • Only vertical scrolling is supported.
  • No decoration view.

Who is using it

Please let me know if your app is using this library. I'm glad to put your app on the list :-)

  • F3PiX F3PiX is a series of apps which gives you a concise, curated collection of pictures by professional (Dutch) photographers according to a specific theme. You can use the pictures freely for your own work.
  • GroupMe for iOS GroupMe - A Home for All the Groups in Your Life.
  • Flickr Access and organize your photos from anywhere.
  • Tumblr Post whatever you want to your Tumblr. Follow other people who are doing the same. You’ll probably never be bored again.
  • Funliday The best trip planning app in the world!
  • Imgur Funny GIFs, Memes, and Images!
  • DealPad DealPad gives you access to the UK’s hottest Deals, Voucher Codes and Freebies in the palm of your hand.
  • Teespring Shopping Browse and purchase shirts, mugs, totes and more!

License

CHTCollectionViewWaterfallLayout is available under the MIT license. See the LICENSE file for more info.

Changelog

Refer to the Releases page.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].