{"id":16221540,"url":"https://github.com/riteshhgupta/rglistkit","last_synced_at":"2025-10-26T23:46:18.018Z","repository":{"id":62451922,"uuid":"78232094","full_name":"riteshhgupta/RGListKit","owner":"riteshhgupta","description":"RGListKit is a Protocol \u0026 MVVM based framework to easily populate a UITableView or UICollectionView via single api.","archived":false,"fork":false,"pushed_at":"2019-01-08T11:17:12.000Z","size":297,"stargazers_count":179,"open_issues_count":3,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-14T01:35:05.177Z","etag":null,"topics":["datasource","ios","listkit","mvvm","protocol","swift","uicollectionview","uitableview"],"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/riteshhgupta.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}},"created_at":"2017-01-06T19:17:56.000Z","updated_at":"2025-04-07T02:11:03.000Z","dependencies_parsed_at":"2022-11-01T23:45:34.023Z","dependency_job_id":null,"html_url":"https://github.com/riteshhgupta/RGListKit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/riteshhgupta/RGListKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshhgupta%2FRGListKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshhgupta%2FRGListKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshhgupta%2FRGListKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshhgupta%2FRGListKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riteshhgupta","download_url":"https://codeload.github.com/riteshhgupta/RGListKit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshhgupta%2FRGListKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274981523,"owners_count":25385327,"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-09-13T02:00:10.085Z","response_time":70,"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":["datasource","ios","listkit","mvvm","protocol","swift","uicollectionview","uitableview"],"created_at":"2024-10-10T12:08:41.112Z","updated_at":"2025-10-26T23:46:12.972Z","avatar_url":"https://github.com/riteshhgupta.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RGListKit\n\nRGListKit is a **Protocol** \u0026 **MVVM** based framework for populating `UITableView` \u0026 `UICollectionView`. It takes care of **batch-reload** as well which is powered by [Dwifft](https://github.com/jflinter/Dwifft).\n\n## Features\n- No need to call `reloadData()`\n- No need to manage indexPaths to `performBatchUpdates(_:, completion:)`\n- No need to use different apis to populate UITableView \u0026 UICollectionView\n- It works with multiple sections\n- It works with multiple cell types\n- `ListableView`, a protocol which unifies UITableView \u0026 UICollectionView\n- `ListManager` takes care of populating a `ListableView`\n- `[sections]` is all you need to set which acts like a datasource to populate a `ListableView`\n- `ItemModel`, a protocol which unifies UITableViewCell \u0026 UICollectionViewCell\n- Every cell is populated/configured via an `ItemModel` which is based on MVVM pattern\n- Decoupled diffing algorithm, powered by [Dwifft](https://github.com/jflinter/Dwifft)\n- Extendible API\n- Written completely in Swift \n\n## Installation\n\n### Cocoapods\nTo integrate RGListKit into your Xcode project using CocoaPods, specify it in your Podfile:\n\n#### Swift 3.1\n```\n  pod 'RGListKit', :git =\u003e 'https://github.com/riteshhgupta/RGListKit.git', :branch =\u003e 'swift3'\n```\n\n#### Swift 4.0\n```\n  pod 'RGListKit', :git =\u003e 'https://github.com/riteshhgupta/RGListKit.git'\n```\n\n#### Swift 4.0 + ReactiveSwift\n```\n  pod 'RGListKit/ReactiveSwift', :git =\u003e 'https://github.com/riteshhgupta/RGListKit.git', :branch =\u003e 'swift4'\n```\n\n## Example\n### UITableView\n```swift\n...\n\t\tlet tableView = UITableView()\n\t\tlet cellModels: [ItemModel] = [...]\n\t\tlet sectionModel = SectionModel(id: \"section-one-id\", cells: cellModels)\n\t\t\n\t\tlistManager = ListManager(listView: tableView)\n\t\tlistManager.sections = [sectionModel]\n...\n```\n\n### UICollectionView\n```swift\n...\n\t\tlet collectionView = UICollectionView()\n\t\tlet cellModels: [ItemModel] = [...]\n\t\tlet sectionModel = SectionModel(id: \"section-one-id\", cells: cellModels)\n\t\t\n\t\tlistManager = ListManager(listView: collectionView)\n\t\tlistManager.sections = [sectionModel]\n...\n```\n\n## Internal Architecture\n\n- As you can see the api for populating UITableView or UICollectionView is identical, one of the benefits of using RGListKit. \n- `ItemModel` defines a cell or even a header/footer-view for both UITableViewCell \u0026 UICollectionViewCell\n- `ListManager` has a property `sections` which when set triggers the view update\n- All the updates are by default batch-update but you can turn it off by setting `shouldPerformBatchUpdate = false`\n- You don't have to worry about indexPaths anymore, it uses diffing of old \u0026 new array of sections which calculates \u0026 performs the update for you.\n- It doesn't intefere at all with custom views, like custom table cell or custom layout for collection view. RGListKit only takes care of your datasource and not the UI appearance. So you are free to use any custom layouts as required along with RGListKit.\n- Since RGListKit consumes both `delegate` \u0026 `datasource` so you can simply extend `ListManager` to handle any custom use cases like `didSelect` when required. All the methods will be available under `ListManager` e.g.\n\n```swift\n// UICollectionView\n\nextension ListManager {\n\tpublic func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {\n\t}\n}\n\n```\n```swift\n// UITableView\n\nextension ListManager {\n\tpublic func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -\u003e Bool {\n\t}\n}\n```\n\n- There are couple of examples in the project itself which you can checkout or create an issue or ping [me](https://twitter.com/_riteshhh) if anything comes up 👍\n\n## Blogs/Newsletter\nList of online sources which have mentioned RGListKit, \n\n- [Natasha's Swift newsletter - issue #133](https://swiftnews.curated.co/#libraries)\n- [Swift's Weekly - issue #78](http://digest.swiftweekly.com/issues/swift-weekly-issue-78-59042)\n- [Compile Swift newsletter - issue #58](http://mailchi.mp/baadd551f100/the-compileswift-newsletter-issue-1481361)\n- [iOS Cookies Newsletter - issue #82](http://mailchi.mp/1cfc2545e484/ios-cookies-newsletter-1406733)\n\n## Contributing\n\nContributions are welcome and encouraged! Open an [issue](https://github.com/riteshhgupta/RGListKit/issues/new) or submit a [pull request](https://github.com/riteshhgupta/swift-snippets/compare) 🚀\n\n## Licence\n\nRGListKit is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteshhgupta%2Frglistkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friteshhgupta%2Frglistkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteshhgupta%2Frglistkit/lists"}