Giter Club home page Giter Club logo

pdktstickysectionheaderscollectionviewlayout's Introduction

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.

pdktstickysectionheaderscollectionviewlayout's People

Contributors

fillito avatar luisrecuenco avatar patoroco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdktstickysectionheaderscollectionviewlayout's Issues

Header Section animating while using reloadSections

have requirement in which I have to reload particular section instead of whole collectionView.
Now when I scroll collectionView and then try to reload that section, the header section comes with top to down animation. Can you pls help me ?

[CollectionView reloadSections:[NSIndexSet indexSetWithIndex:sender.tag]]

crash on iOS 10 when reloadData

layout attributes for supplementary item at index path (<NSIndexPath: 0xc000000000000116> {length = 2, path = 1 - 0}) changed from <UICollectionViewLayoutAttributes: 0x6100001fdf00> index path: (<NSIndexPath: 0xc000000000000116> {length = 2, path = 1 - 0}); element kind: (UICollectionElementKindSectionHeader)

Find out if header stuck to top

Hi. Is there a way to find out when a header became sticky?
I would like to add a drop shadow to the header when it becomes sticky.

Thanks

Unit Testing

Add a suite of unit tests to PDKTStickySectionHeadersCollectionViewLayout

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.