• Stars
    star
    332
  • Rank 126,957 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 11 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UICollectionView Layout that makes section headers behave like UITableView section headers. Section header views stick to the top of the collection view, over it's section cells.

Description

UICollectionViewFlowLayout subclass that makes section headers behave like UITableView section headers.

Section header views stick to the top of the collection view, over it's section cells.

Sample

Sample Image

Usage

Simply add PDKTStickySectionHeadersCollectionViewLayout.h and PDKTStickySectionHeadersCollectionViewLayout.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 PDKTStickySectionHeadersCollectionViewLayout as your CollectionView Layout Class.

Interface Builder Config

Notes

PDKTStickySectionHeadersCollectionViewLayout is a UICollectionViewFlowLayout subclass, so you also must confrom the UICollectionViewFlowLayoutDelegate protocol in order to provide the required information about the cells to be drawn.

Compatibility

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

License

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