{"id":2902,"url":"https://github.com/CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout","last_synced_at":"2025-08-03T12:31:31.723Z","repository":{"id":13053724,"uuid":"15733881","full_name":"CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout","owner":"CSStickyHeaderFlowLayout","description":"UICollectionView replacement of UITableView. Do even more like Parallax Header, Sticky Section Header. Made for iOS 7.","archived":false,"fork":false,"pushed_at":"2021-07-17T09:11:42.000Z","size":1021,"stargazers_count":5057,"open_issues_count":25,"forks_count":611,"subscribers_count":141,"default_branch":"master","last_synced_at":"2025-07-28T21:25:40.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://medium.com/ios-apprentice/43e943e6627","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CSStickyHeaderFlowLayout.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-08T11:40:32.000Z","updated_at":"2025-07-28T13:49:38.000Z","dependencies_parsed_at":"2022-09-13T22:51:14.500Z","dependency_job_id":null,"html_url":"https://github.com/CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout","commit_stats":null,"previous_names":["jamztang/csstickyheaderflowlayout"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CSStickyHeaderFlowLayout","download_url":"https://codeload.github.com/CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267693161,"owners_count":24129131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:25.871Z","updated_at":"2025-08-03T12:31:31.355Z","avatar_url":"https://github.com/CSStickyHeaderFlowLayout.png","language":"Objective-C","readme":"# CSStickyHeaderFlowLayout\n\n## Contributors\n\nFor anyone who'd like to be a contributor to the repository, please read the [Contribution Guideline](https://github.com/CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout/wiki/Contribution-Guidelines)\n\n---\n\n\u003c!--![](http://cl.ly/image/1D2i0746180b/1*pev9ZXJAZ2MYoF8-R_nbRA.gif)--\u003e\n\n\u003cimg src=\"http://f.cl.ly/items/05130s2r0X1j1x1N0Q3n/spotify-48-16-half.gif\" width=\"276\"/\u003e\n\u003cimg src=\"http://f.cl.ly/items/3q2u35013o0y0G2o3X1v/carshare-32-16-half.gif\" width=\"276\"/\u003e\n\u003cimg src=\"http://f.cl.ly/items/3l0F1F3Y0s1M1F3a2r0d/ripple.gif\" width=\"276\"/\u003e\n\nParallax, Sticky Headers, Growing image heading, done right in one\nUICollectionViewLayout.\n\n## Installation\n\n[![Version](http://cocoapod-badges.herokuapp.com/v/CSStickyHeaderFlowLayout/badge.png)](http://cocoadocs.org/docsets/CSStickyHeaderFlowLayout)\n[![Platform](http://cocoapod-badges.herokuapp.com/p/CSStickyHeaderFlowLayout/badge.png)](http://cocoadocs.org/docsets/CSStickyHeaderFlowLayout)\n\n### Cocoapods\n\nCSStickyHeaderFlowLayout is available through [CocoaPods](http://cocoapods.org), to install\nit simply add the following line to your Podfile:\n\n    pod \"CSStickyHeaderFlowLayout\"\n\n### Carthage\n\nCSStickyHeaderFlowLayout is also available with Carthage.\nAdd `github \"CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout\"` to your Cartfile\n\nAlternatively, you can just drag the files from `CSStickyHeaderFlowLayout / Classes` into your own project.\n\n## Usage (Swift/Code)\n\nDocumentation is coming soon. For now please open `CSStickyHeaderFlowLayout.xcworkspace` \u003e `SwiftDemo` target.\n\n## Usage (CocoaPods/Objective-C/Storyboard)\n\nTo run the example project; clone the repo, and run `pod install` from the Project directory first.\n\n**1. Setting up the Sticky Section Header**\n\nConfigure your collection view to use `CSStickyHeaderFlowLayout`. Here's an example on how you to do it in Storyboard.\n\n![](http://f.cl.ly/items/32183h2q18171k323J07/csstickyheaderflowlayout-class.jpg)\n\nNow all your **section headers** will get the sticky effect like table view. You can disable it with one line of code.\n\n```objective-c\n@property (nonatomic) BOOL disableStickyHeaders;\n```\n\n**2. Setting up the Collection View Header**\n\nWe'll be using _supplementary views_ for our parallax header. Here's an example on how use a nib file for that purpose:\n\n![](http://f.cl.ly/items/0x1L0U2x1U0g2q2E1i3Z/header-grow.jpeg)\n\nRegister that nib file to your collection view controller in code:\n\n```objective-c\n#import \"CSStickyHeaderFlowLayout.h\"\n\n- (void)viewDidLoad {\n\n    [super viewDidLoad];\n\n    // Locate your layout\n    CSStickyHeaderFlowLayout *layout = (id)self.collectionViewLayout;\n    if ([layout isKindOfClass:[CSStickyHeaderFlowLayout class]]) {\n        layout.parallaxHeaderReferenceSize = CGSizeMake(320, 200);\n    }\n\n    // Locate the nib and register it to your collection view\n    UINib *headerNib = [UINib nibWithNibName:@\"CSGrowHeader\" bundle:nil];\n    [self.collectionView registerNib:headerNib\n          forSupplementaryViewOfKind:CSStickyHeaderParallaxHeader\n                 withReuseIdentifier:@\"header\"];\n\n}\n```\n\nImplement `-[UICollectionViewDataSource collectionView:viewForSupplementaryElementOfKind:atIndexPath:]`\n\n```objective-c\n- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {\n\n    // Check the kind if it's CSStickyHeaderParallaxHeader\n    if ([kind isEqualToString:CSStickyHeaderParallaxHeader]) {\n\n        UICollectionReusableView *cell = [collectionView dequeueReusableSupplementaryViewOfKind:kind\n                                                                            withReuseIdentifier:@\"header\"\n                                                                                   forIndexPath:indexPath];\n\n        return cell;\n\n    } else if ([kind isEqualToString:UICollectionElementKindSectionHeader]) {\n        // Your code to configure your section header...\n    } else {\n        // other custom supplementary views\n    }\n    return nil;\n}\n```\n\nThat's it. You'll be able to get the header you wanted using the best practice.\n\nConfiguring other effects are really just the way how you setup the header cell, by combining different settings in the minimal exposed properties in [CSStickyHeaderFlowLayout.h][]\n\n```objective-c\n@property (nonatomic) CGSize parallaxHeaderReferenceSize;\n@property (nonatomic) CGSize parallaxHeaderMinimumReferenceSize;\n@property (nonatomic) BOOL disableStickyHeaders;\n```\n\nRun the project examples and it'll shows you exactly how you achieve different effects.\n\n![](http://f.cl.ly/items/313D2n3R0H0e0x090B3X/different-header.jpeg)\n\n## Updates\n- 0.2.12: Add Swift 5 Demo\n\n- 0.2.11: Add support for carthage.\n\n- 0.2.10: Fixed issue because attributes were not copied and datasource might have been niled\n\n- 0.2.9: Remove Supplementry Header Layout Attribute to prevent crash when returning nil and while is CGSizeZero\n\n- 0.2.8: Fixed a visual issue when animating contentInsets #85 and crash when dragging cells #69\n\n- 0.2.7: Fixed scroll indicator covered by cell\n\n- 0.2.6: Fixing that section header being covered by cell after perform batch update\n\n- 0.2.5: Fixing a crash when quickly popping back to a view controller using the parallax header\n\n- 0.2.4: Possibly fix for a crash when parallaxHeaderReferenceSize is changed\n\n- 0.2.3: Enabled iPhone 6 screen sizes, reverted a patch and fixed a visual bug and content tapping bug.\n\n- 0.2.2: Fix 1px header and zIndex problem, thanks\n  [@m1entus](https://github.com/m1entus) and [@Xyand](https://github.com/Xyand)\n\n- 0.2.1: Fix crash on reloadData in collection view when header is offscreen, thanks [@jessesquires](https://github.com/jessesquires)\n\n- 0.2: Added custom UICollectionViewLayoutAttributes to support more advanced example (Spotify App)\n\n- 0.1.1: Minor fixes for default number of sections, thanks [@miwillhite](https://github.com/miwillhite)\n\n- 0.1: Initial Release\n\n## Who's using it?\n\nWe've a [wiki page][made] for that, feel free to add your projects there!\n\n## Requirements\n\n- Xcode 5\n- iOS 7 (I haven't really test on iOS 6 but it should work if you're using iOS 6 compatible Storyboard)\n\n## Author\n\nJames Tang, j@jamztang.com\n\n## License\n\nCSStickyHeaderFlowLayout is available under the MIT license. See the LICENSE file for more info.\n\n[CSStickyHeaderFlowLayout.h]:https://github.com/jamztang/CSStickyHeaderFlowLayout/blob/master/Classes/CSStickyHeaderFlowLayout.h\n\n[Carshare]:http://carshare.hk\n[Ripple]:http://ripplechat.io\n[made]:https://github.com/jamztang/CSStickyHeaderFlowLayout/wiki\n","funding_links":[],"categories":["UI","HarmonyOS","Objective-C","etc"],"sub_categories":["Table View / Collection View","Windows Manager","Layout","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCSStickyHeaderFlowLayout%2FCSStickyHeaderFlowLayout/lists"}