{"id":16835325,"url":"https://github.com/hackiftekhar/iqlistkit","last_synced_at":"2025-08-07T01:28:57.183Z","repository":{"id":54909965,"uuid":"325558305","full_name":"hackiftekhar/IQListKit","owner":"hackiftekhar","description":"Model driven UITableView/UICollectionView","archived":false,"fork":false,"pushed_at":"2025-03-18T08:30:47.000Z","size":10316,"stargazers_count":63,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-06T04:36:20.699Z","etag":null,"topics":["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/hackiftekhar.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":"2020-12-30T13:30:43.000Z","updated_at":"2025-03-18T08:30:50.000Z","dependencies_parsed_at":"2023-02-12T02:45:38.124Z","dependency_job_id":"c0a5d26b-a26e-472f-9e2a-564a9bf0c920","html_url":"https://github.com/hackiftekhar/IQListKit","commit_stats":{"total_commits":53,"total_committers":3,"mean_commits":"17.666666666666668","dds":"0.26415094339622647","last_synced_commit":"0c5cc7e0939c74b23e3507d3d93ab69f9ef2d675"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackiftekhar%2FIQListKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackiftekhar%2FIQListKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackiftekhar%2FIQListKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackiftekhar%2FIQListKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackiftekhar","download_url":"https://codeload.github.com/hackiftekhar/IQListKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054194,"owners_count":21039952,"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":["swift","uicollectionview","uitableview"],"created_at":"2024-10-13T12:09:43.039Z","updated_at":"2025-04-09T14:15:43.559Z","avatar_url":"https://github.com/hackiftekhar.png","language":"Swift","funding_links":["https://github.com/sponsors/hackiftekhar","https://www.paypal.me/hackiftekhar","https://www.buymeacoffee.com/hackiftekhar"],"categories":[],"sub_categories":[],"readme":"\n# 🏆 **IQListKit**  \nModel-Driven `UITableView` and `UICollectionView` in Swift  \n\n![Insertion Sort](https://raw.githubusercontent.com/hackiftekhar/IQListKit/master/Documents/insertion_sort.gif)\n![Conference Video Feed](https://raw.githubusercontent.com/hackiftekhar/IQListKit/master/Documents/conference_video_feed.gif)\n![Orthogonal Section](https://raw.githubusercontent.com/hackiftekhar/IQListKit/master/Documents/orthogonal_section.gif)\n![Mountains](https://raw.githubusercontent.com/hackiftekhar/IQListKit/master/Documents/mountains.gif)\n![User List](https://raw.githubusercontent.com/hackiftekhar/IQListKit/master/Documents/users_list.gif)\n\n[![Build Status](https://travis-ci.org/hackiftekhar/IQListKit.svg)](https://travis-ci.org/hackiftekhar/IQListKit)\n[![CocoaPods](https://img.shields.io/cocoapods/v/IQListKit.svg)](http://cocoadocs.org/docsets/IQListKit)  \n[![Swift Version](https://img.shields.io/badge/Swift-5.7%2B-orange.svg)](https://www.swift.org/)\n[![Platform](https://img.shields.io/badge/platform-iOS-blue)]()  \n\n---\n\n## 🚀 **Why IQListKit?**\nIQListKit simplifies working with `UITableView` and `UICollectionView` by eliminating the need to implement `dataSource` methods manually. Just define your sections, models, and cell types — IQListKit takes care of the rest, including:  \n✅ Automatic diffing and animations  \n✅ Clean and reusable code  \n✅ Single API for both `UITableView` and `UICollectionView`  \n\n---\n\n## 🎯 **Features**\n- ✅ **Unified API** – Works with both `UITableView` and `UICollectionView`  \n- ✅ **Diffable Data Source** – Smooth animations and state updates  \n- ✅ **Declarative Syntax** – Cleaner and more concise code  \n- ✅ **Custom Headers/Footers** – Easy to implement and manage  \n- ✅ **Reusable Cells** – No more `dequeueReusableCell` hassles  \n\n---\n\n## 📋 **Requirements**\n| Version | Swift | iOS Target | Xcode Version |\n|---------|-------|------------|---------------|\n| IQListKit 1.1.0 | Swift 5.7+ | iOS 9.0+ | Xcode 11+ |\n| IQListKit 4.0.0+ | Swift 5.7+ | iOS 13.0+ | Xcode 14+ |\n| IQListKit 5.0.0+ | Swift 5.7+ | iOS 13.0+ | Xcode 14+ |\n\n---\n\n## 📦 **Installation**\n\n### ▶️ **Swift Package Manager**\n1. Open Xcode → File → Add Package Dependency  \n2. Enter URL:  \n   ``` \n   https://github.com/hackiftekhar/IQListKit.git \n   ``` \n3. Select the version and install.  \n\n### ▶️ **CocoaPods**\nAdd to your `Podfile`:  \n```ruby\npod 'IQListKit'\n```\n\n### ▶️ **Manual Installation**\n1. Clone the repository.  \n2. Drag and drop the `IQListKit` folder into your project.  \n\n---\n\n## 🛠️ **How to Use IQListKit**\nLet’s build a user list in **5 simple steps**!  \n\n### **1️⃣ Create a Model**\nMake sure your model conforms to `Hashable`:  \n```swift\nstruct User: Hashable {\n    let id: Int\n    let name: String\n}\n```\n\n### **2️⃣ Create a Cell**\nCreate a cell that conforms to `IQModelableCell`:  \n```swift\nclass UserCell: UITableViewCell, IQModelableCell {\n    @IBOutlet var nameLabel: UILabel!\n\n    struct Model: Hashable {\n        let user: User\n    }\n\n    var model: Model? {\n        didSet {\n            nameLabel.text = model?.user.name\n        }\n    }\n}\n```\n\n### **3️⃣ Set Up the List**\nCreate a `list` in your `UIViewController`:  \n```swift\nclass UsersViewController: UIViewController {\n    \n    private lazy var list = IQList(listView: tableView, delegateDataSource: self)\n    private var users = [User(id: 1, name: \"John\"), User(id: 2, name: \"Jane\")]\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        loadData()\n    }\n}\n```\n\n### **4️⃣ Provide Data**\nProvide data directly to `IQListKit`:  \n```swift\nfunc loadData() {\n    list.reloadData { [users] builder in\n\n        let section = IQSection(identifier: \"Users\")\n        builder.append([section])\n\n        let models: [UserCell.Model] = users.map { .init(user: $0) }\n        builder.append(UserCell.self, models: models, section: section)\n    }\n}\n```\n\n### **5️⃣ Handle Selection**\nHandle user selection easily:  \n```swift\nextension UsersViewController: IQListViewDelegateDataSource {\n    func listView(_ listView: IQListView, didSelect item: IQItem, at indexPath: IndexPath) {\n        if let model = item.model as? UserCell.Model {\n            print(\"Selected user: \\(model.user.name)\")\n        }\n    }\n}\n```\n\n---\n\n## 🧰 **Using the Wrapper Class**  \nIf you would like to display a **single-section list** of similar objects in a `UITableView` or `UICollectionView`, IQListKit provides a convenient `IQListWrapper` class to handle all the boilerplate code for you.\n\n### ▶️ **Setup with IQListWrapper**\nYou can set up `IQListWrapper` in just a few lines of code:\n\n```swift\nclass UsersViewController: UIViewController {\n\n    @IBOutlet var tableView: UITableView!\n\n    private lazy var listWrapper = IQListWrapper(listView: tableView,\n                                                 type: UserCell.self,\n                                                 registerType: .nib,\n                                                 delegateDataSource: self)\n    private var users = [User(id: 1, name: \"John\"), User(id: 2, name: \"Jane\")]\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        loadData()\n    }\n\n    func loadData() {\n        listWrapper.setModels(users, animated: true, completion: nil)\n    }\n}\n```\n\nThe `IQListWrapper` class reduces complexity by handling the setup and data binding automatically, making it ideal for quick implementations!  \n\n---\n\n## 📖 **Documentation**\n- [Delegate, DataSource and Cell Configuration Guide](https://github.com/hackiftekhar/IQListKit/blob/master/Documents/Delegate_DataSource_Guide.md)\n- [Workaround Guide](https://github.com/hackiftekhar/IQListKit/blob/master/Documents/Workarounds.md)\n- [IQListKit Presentation](https://raw.githubusercontent.com/hackiftekhar/IQListKit/master/Documents/IQListKitPresentation.pdf)  \n- [Modern Collection View](https://raw.githubusercontent.com/hackiftekhar/IQListKit/master/Documents/IQListKitWithModernCollectionView.pdf)  \n\n---\n\n## 🏆 **Best Practices**\n- Always handle cell reuse correctly to avoid glitches.  \n- Use lightweight models for better memory usage.  \n\n\n## ❤️ **Contributions**\nContributions are welcome!  \n- Report issues  \n- Submit pull requests  \n- Improve documentation  \n\n---\n\n## 📄 **License**\nIQListKit is distributed under the MIT license.  \n\n---\n\n## 👨‍💻 **Author**\nIftekhar Qureshi  \n- GitHub Sponsors: [Support my open-source work](https://github.com/sponsors/hackiftekhar)\n- PayPal: [PayPal](https://www.paypal.me/hackiftekhar)\n- Buy Me a Coffee: [Support here](https://www.buymeacoffee.com/hackiftekhar)\n- Twitter: [@hackiftekhar](https://twitter.com/hackiftekhar)\n- Website: [hackiftekhar.com](https://hackiftekhar.com)\n\n---\n\n### ⭐️ **Star the repo on GitHub if you like it!**  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackiftekhar%2Fiqlistkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackiftekhar%2Fiqlistkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackiftekhar%2Fiqlistkit/lists"}