Latest 0.1
Homepage https://github.com/Produkt/PDKTCollectionViewWaterfallLayout
License MIT This code is distributed under the terms and conditions of the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Platforms ios 6.0, requires ARC
Frameworks UIKit

Description

UICollectionViewLayout subclass to get the effect of Waterfall Layout (Popularized by Pinterest).

Sample

Sample Image
Sample Image 2

Features

  • Multiple sections support
  • Every section can have its own number of columns
  • Section header and footer support
  • Easy configuration: Using properties or delegate protocol implementation
  • Automatic cell geometry calculation using aspect ratio instead of sizes

Usage

Simply add PDKTCollectionViewWaterfallLayout.h and PDKTCollectionViewWaterfallLayout.m files to your project and use it as your UICollectionViewLayout

If you are using Interface Builder to configure your Collection View, simply switch “Flow” to “Custom” at the Layout selector. Then set PDKTCollectionViewWaterfallLayout as your CollectionView Layout Class.

Interface Builder Config

Compatibility

  • PDKTCollectionViewWaterfallLayout is compatible with iOS6.0+
  • PDKTCollectionViewWaterfallLayout requires ARC.

Contributors

Special thanks to @caldofran for his contributions

License

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

Latest podspec

{
    "name": "PDKTCollectionViewWaterfallLayout",
    "version": "0.1",
    "summary": "UICollectionViewLayout subclass to get the effect of Waterfall Layout (Popularized by Pinterest).",
    "homepage": "https://github.com/Produkt/PDKTCollectionViewWaterfallLayout",
    "authors": "Daniel Garcu00eda",
    "source": {
        "git": "https://github.com/Produkt/PDKTCollectionViewWaterfallLayout.git",
        "tag": "0.1"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source_files": "PDKTCollectionViewWaterfallLayout/*.{h,m}",
    "frameworks": "UIKit",
    "requires_arc": true,
    "license": {
        "type": "MIT",
        "text": "                This code is distributed under the terms and conditions of the MIT license.nn                Permission is hereby granted, free of charge, to any person obtaining a copy ofn                this software and associated documentation files (the "Software"), to deal inn                the Software without restriction, including without limitation the rights ton                use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies ofn                the Software, and to permit persons to whom the Software is furnished to do so,n                subject to the following conditions:nn                The above copyright notice and this permission notice shall be included in alln                copies or substantial portions of the Software.nn                THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORn                IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSn                FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS ORn                COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHERn                IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INn                CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.n"
    }
}

Pin It on Pinterest

Share This