{"id":2887,"url":"https://github.com/3sidedcube/ThunderCollection","last_synced_at":"2025-08-03T12:31:34.464Z","repository":{"id":46916871,"uuid":"99827483","full_name":"3sidedcube/ThunderCollection","owner":"3sidedcube","description":"A wrapper around UICollectionViewController enabling a declarative API around it's delegate methods using protocols.","archived":false,"fork":false,"pushed_at":"2023-08-22T14:25:59.000Z","size":114,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-24T18:58:02.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3sidedcube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-08-09T16:03:30.000Z","updated_at":"2024-02-18T08:12:10.000Z","dependencies_parsed_at":"2024-04-24T18:18:21.657Z","dependency_job_id":"0dba3d18-f260-4270-8e1e-f099dedc0b5a","html_url":"https://github.com/3sidedcube/ThunderCollection","commit_stats":{"total_commits":73,"total_committers":6,"mean_commits":"12.166666666666666","dds":"0.12328767123287676","last_synced_commit":"32f5d96a13f97f5c15ab77ddfdfab0793f723958"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FThunderCollection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FThunderCollection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FThunderCollection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FThunderCollection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3sidedcube","download_url":"https://codeload.github.com/3sidedcube/ThunderCollection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543163,"owners_count":17934435,"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":[],"created_at":"2024-01-05T20:16:25.474Z","updated_at":"2024-12-07T00:31:02.469Z","avatar_url":"https://github.com/3sidedcube.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Table View / Collection View"],"readme":"# Thunder Collection\n\n[![Build Status](https://travis-ci.org/3sidedcube/ThunderCollection.svg)](https://travis-ci.org/3sidedcube/ThunderCollection) [![Swift 5.5](http://img.shields.io/badge/swift-5.5-brightgreen.svg)](https://swift.org/blog/swift-5-5-released/) [![Apache 2](https://img.shields.io/badge/license-Apache%202-brightgreen.svg)](LICENSE.md)\n\nThunder Collection is a useful framework which enables quick and easy creation of collection views in iOS using a declarative approach. It makes the process of creating complex collection views as simple as a few lines of code; and removes the necessity for having long chains of index paths and if statements.\n\n## How It Works\n\nThunder Collection comprises of two main types of objects:\n\n### Items\n\nCollection items are objects that conform to the `CollectionItemDisplayable` protocol, this protocol has properties such as: `cellClass`, `selectionHandler` which are responsible for defining how the cell is configured. As this is a protocol any object can conform to it, which allows you to simply send an array of model objects to the collection view to display your content.\n\n### Sections\n\nCollection sections are objects that conform to the `CollectionSectionDisplayable` protocol, most of the time you won't need to implement this protocol yourself as Thunder Collection has a convenience class `CollectionSection` which can be used in most circumstances. However you can implement more complex layouts using this protocol on your own classes.\n\n# Installation\n\nSetting up your app to use ThunderCollection is a simple and quick process. You can choose between a manual installation, or use Carthage.\n\n## Carthage\n\n- Add `github \"3sidedcube/ThunderCollection\" == 2.0.0` to your Cartfile.\n- Run `carthage update --platform ios --use-xcframeworks` to fetch the framework.\n- Drag `ThunderCollection` into your project's _Frameworks and Libraries_ section from the `Carthage/Build` folder (Embed).\n- Add the Build Phases script step as defined [here](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos).\n\n## Manual\n\n- Clone as a submodule, or download this repo\n- Import ThunderCollection.xcproject into your project\n- Add ThunderCollection.framework to your Embedded Binaries.\n- Wherever you want to use ThunderCollection use `import ThunderCollection`.\n\n# Code Example\n## A Simple Collection View Controller\n\nSetting up a collection view is massively simplified using thunder collection, in fact, we can get a simple collection view running with just a few lines of code. To create a custom collection view we subclass from `CollectionViewController`. We then set up our collection view in the `viewDidLoad:` method. In contrast to [ThunderCollection](https://github.com/3sidedcube/iOS-ThunderCollection) no default implementations of `CollectionItemDisplayable` are provided, as there is no standard implementation of `UICollectionViewCell` like there is with `UITableViewCell`.\n\n```swift\nimport ThunderCollection\n\nclass MyCollectionViewController: CollectionViewController {\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        // ImageRow not provided by framework!\n        let imageRow = ImageRow(image: someImage)\n        \n        let section = CollectionSection(rows: [imageRow])\n        data = [section]\n    }\n}\n```\n\n# License\nSee [LICENSE.md](LICENSE.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2FThunderCollection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3sidedcube%2FThunderCollection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2FThunderCollection/lists"}