{"id":42415600,"url":"https://github.com/evancooper9/ecuicollectionviewmultidelegate","last_synced_at":"2026-01-28T02:01:20.041Z","repository":{"id":130778011,"uuid":"303227732","full_name":"EvanCooper9/ECUICollectionViewMultiDelegate","owner":"EvanCooper9","description":"Adds the ability for a collection view to have multiple delegates.","archived":false,"fork":false,"pushed_at":"2020-11-04T21:16:58.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-03-09T05:36:20.075Z","etag":null,"topics":["delegate","spm","swift","uicollectionview"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvanCooper9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-11T22:58:02.000Z","updated_at":"2020-11-04T21:15:51.000Z","dependencies_parsed_at":"2026-01-28T02:00:53.293Z","dependency_job_id":null,"html_url":"https://github.com/EvanCooper9/ECUICollectionViewMultiDelegate","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/EvanCooper9/ECUICollectionViewMultiDelegate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCooper9%2FECUICollectionViewMultiDelegate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCooper9%2FECUICollectionViewMultiDelegate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCooper9%2FECUICollectionViewMultiDelegate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCooper9%2FECUICollectionViewMultiDelegate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvanCooper9","download_url":"https://codeload.github.com/EvanCooper9/ECUICollectionViewMultiDelegate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCooper9%2FECUICollectionViewMultiDelegate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28833348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"online","status_checked_at":"2026-01-28T02:00:06.943Z","response_time":57,"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":["delegate","spm","swift","uicollectionview"],"created_at":"2026-01-28T02:00:31.360Z","updated_at":"2026-01-28T02:01:20.033Z","avatar_url":"https://github.com/EvanCooper9.png","language":"Swift","readme":"# ECUICollectionViewMultiDelegate\n\nAdds the ability for a collection view to have multiple delegates.\n\n## Installation\n### Swift Package Manager\n\n```swift\n.package(url: \"https://github.com/EvanCooper9/ECUICollectionViewMultiDelegate\", from: \"0.1.0\")\n```\n\n## Usage\n\n### Initial setup\n\n1. Create an instance of `ECUICollectionViewMultiDelegate`\n2. Set your collection view's delegate to that instance\n3. Add and remove as many delegates to your `ECUICollectionViewMultiDelegate` instance through `add` and `remove` methods\n\n### Delegate methods that return values\nSome `UICollectionViewDelegate` methods require a return value (i.e. `collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -\u003e Bool`). When multiple delegates are involved, it's hard to decide which value to take. `ECUICollectionViewMultiDelegate` will attempt to reduce all of the values returned by all the delegates, via it's `reductionDelegate` property. \n\n1. Implement `ECReductionDelegate`\n2. Assign the `reductionDelegate` property of your `ECUICollectionViewMultiDelegate` instance and decide which value to return\n\n\u003e Note: If `reductionDelegate` is `nil`, the value returned will be from the last added delegate _that responds to the current method_. If no delegate responds to the current method, the default `UICollectionViewDelegate` value will be returned, as if no delegate was ever assigned.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevancooper9%2Fecuicollectionviewmultidelegate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevancooper9%2Fecuicollectionviewmultidelegate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevancooper9%2Fecuicollectionviewmultidelegate/lists"}