{"id":2868,"url":"https://github.com/abdullahselek/ASCollectionView","last_synced_at":"2025-08-06T16:31:54.683Z","repository":{"id":9669316,"uuid":"62951582","full_name":"abdullahselek/ASCollectionView","owner":"abdullahselek","description":"Lightweight custom collection view inspired by Airbnb.","archived":false,"fork":false,"pushed_at":"2024-05-14T10:48:00.000Z","size":8299,"stargazers_count":372,"open_issues_count":0,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-12-06T14:21:31.140Z","etag":null,"topics":["collectionview","landscape","parallax-scrolling","portrait","swift-collection","ui-components"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/abdullahselek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-09T13:49:54.000Z","updated_at":"2024-07-24T12:47:23.000Z","dependencies_parsed_at":"2024-04-27T23:32:14.320Z","dependency_job_id":"4c0525eb-d4d2-4119-a2d2-8152dc6309a5","html_url":"https://github.com/abdullahselek/ASCollectionView","commit_stats":{"total_commits":154,"total_committers":5,"mean_commits":30.8,"dds":"0.22077922077922074","last_synced_commit":"cbdbb0b72af69c7aa512284157e37c0842a71e26"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FASCollectionView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FASCollectionView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FASCollectionView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FASCollectionView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdullahselek","download_url":"https://codeload.github.com/abdullahselek/ASCollectionView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228923730,"owners_count":17992569,"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","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":["collectionview","landscape","parallax-scrolling","portrait","swift-collection","ui-components"],"created_at":"2024-01-05T20:16:24.974Z","updated_at":"2024-12-09T16:31:12.180Z","avatar_url":"https://github.com/abdullahselek.png","language":"Swift","readme":"[![ASCollectionView CI](https://github.com/abdullahselek/ASCollectionView/workflows/ASCollectionView%20CI/badge.svg)](https://github.com/abdullahselek/ASCollectionView/actions)\n[![Build Status](https://travis-ci.org/abdullahselek/ASCollectionView.svg?branch=master)](https://travis-ci.org/abdullahselek/ASCollectionView)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/ASCollectionView.svg)](http://cocoapods.org/pods/ASCollectionView)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Coverage Status](https://coveralls.io/repos/github/abdullahselek/ASCollectionView/badge.svg?branch=master)](https://coveralls.io/github/abdullahselek/ASCollectionView?branch=master)\n![Platform](https://img.shields.io/cocoapods/p/ASCollectionView.svg?style=flat)\n![License](https://img.shields.io/dub/l/vibe-d.svg)\n\n# ASCollectionView\nLightweight custom collection view inspired by Airbnb.\n\n## Screenshots\n\n![portrait](https://github.com/abdullahselek/ASCollectionView/blob/master/screenshots/ascollectionview_1.png)\n![portrait_2](https://github.com/abdullahselek/ASCollectionView/blob/master/screenshots/ascollectionview_2.png)\n![landscape](https://github.com/abdullahselek/ASCollectionView/blob/master/screenshots/ascollectionview_3.png)\n\n## Requirements\n\n| ASCollectionView Version | Minimum iOS Target  | Swift Version |\n|:--------------------:|:---------------------------:|:---------------------------:|\n| 1.4.0 | 10.0 | 5.x |\n| 1.1.0 | 9.0 | 4.2 |\n| 1.0.9 | 9.0 | 4.1 |\n| 1.0.8 | 9.0 | 4.0 |\n| 1.0.7 | 9.0 | 3.x |\n| 1.0.2 | 8.0 | 2.x |\n\n## CocoaPods\n\nCocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:\n```\t\n$ gem install cocoapods\n```\n\nTo integrate ASCollectionView into your Xcode project using CocoaPods, specify it in your Podfile:\n```\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '10.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\n    pod 'ASCollectionView', '1.4.0'\nend\n```\nThen, run the following command:\n```\n$ pod install\n```\n\n## Carthage\n\nCarthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with Homebrew using the following command:\n\n```\nbrew update\nbrew install carthage\n```\n\nTo integrate ASCollectionView into your Xcode project using Carthage, specify it in your Cartfile:\n\n```\ngithub \"abdullahselek/ASCollectionView\" ~\u003e 1.4.0\n```\n\nRun carthage update to build the framework and drag the built ASCollectionView.framework into your Xcode project.\n\n## Swift Package Manager\n\nModify your Package.swift file to include the following dependency:\n\n```\n.package(url: \"https://github.com/abdullahselek/ASCollectionView.git\", from: \"1.4.0\")\n```\n\nRun `swift package resolve`\n\n## XCFramework\n\nXCFrameworks require Xcode 11 or later and integration is very similar to integration of .framework format. Please use script [scripts/build-framework.sh](scripts/build-framework.sh) to generate binary ASCollectionView.xcframework archive that you can use as a dependency in Xcode.\n\nASCollectionView.xcframework is a Release (Optimized) binary that offer best available Swift code performance.\n\n## Example Usage\n\nThere is a sample viewcontroller inside demo folder and I added some sample code below.\n\nYou can add collectionview to your storyboard, xib file or add programmatically and then set constraints. Turn back to your\nviewcontroller and implement custom datasource and delegate methods.\n```\nclass ViewController: UIViewController, ASCollectionViewDataSource, ASCollectionViewDelegate {\n...\n\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    collectionView.registerNib(UINib(nibName: collectionElementKindHeader, bundle: nil), forSupplementaryViewOfKind: collectionElementKindHeader, withReuseIdentifier: \"header\")\n    collectionView.delegate = self\n    collectionView.asDataSource = self\n}\n\n// MARK: ASCollectionViewDataSource\n\nfunc numberOfItemsInASCollectionView(asCollectionView: ASCollectionView) -\u003e Int {\n    return numberOfItems\n}\n\nfunc collectionView(asCollectionView: ASCollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -\u003e UICollectionViewCell {\n    let gridCell = collectionView.dequeueReusableCellWithReuseIdentifier(\"cell\", forIndexPath: indexPath) as! GridCell\n    gridCell.label.text = NSString(format: \"Item %ld \", indexPath.row) as String\n    gridCell.imageView.image = UIImage(named: NSString(format: \"image-%ld\", indexPath.row % 10) as String)\n    return gridCell\n}\n\nfunc collectionView(asCollectionView: ASCollectionView, parallaxCellForItemAtIndexPath indexPath: NSIndexPath) -\u003e ASCollectionViewParallaxCell {\n    let parallaxCell = collectionView.dequeueReusableCellWithReuseIdentifier(\"parallaxCell\", forIndexPath: indexPath) as! ParallaxCell\n    parallaxCell.label.text = NSString(format: \"Item %ld \", indexPath.row) as String\n    parallaxCell.updateParallaxImage(UIImage(named: NSString(format: \"image-%ld\", indexPath.row % 10) as String)!)\n    return parallaxCell\n}\n\nfunc collectionView(asCollectionView: ASCollectionView, headerAtIndexPath indexPath: NSIndexPath) -\u003e UICollectionReusableView {\n    let header = collectionView.dequeueReusableSupplementaryViewOfKind(ASCollectionViewElement.Header, withReuseIdentifier: \"header\", forIndexPath: indexPath)\n    return header\n}\n\nfunc loadMoreInASCollectionView(asCollectionView: ASCollectionView) {\n    if numberOfItems \u003e 30 {\n        collectionView.enableLoadMore = false\n        return\n    }\n    numberOfItems += 10\n    collectionView.loadingMore = false\n    collectionView.reloadData()\n}\n```\nGridCell collectionview cell used in sample\n```\nclass GridCell: UICollectionViewCell {\n\n    @IBOutlet var label: UILabel!\n    @IBOutlet var imageView: UIImageView!\n\n}\n```\nParallaxCell used in sample\n```\nclass ParallaxCell: ASCollectionViewParallaxCell {\n\n\t@IBOutlet var label: UILabel!\n\n}\n```\n## The MIT License (MIT)\n```\nCopyright (c) 2016 Abdullah Selek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n## Credits\n```\nInspired by Airbnb and ninjaprox. Improved and all coded in new programming \nlanguage Swift.\n```\n","funding_links":[],"categories":["UI","Libs","CollectionView","UI [🔝](#readme)"],"sub_categories":["Table View / Collection View","UI","Layout","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahselek%2FASCollectionView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahselek%2FASCollectionView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahselek%2FASCollectionView/lists"}