IGListKit README

The project's README from github.com/Instagram/IGListKit. As one markdown file: README.md.

Build Status Coverage Status Pods Version Platforms Carthage Compatible


A data-driven UICollectionView framework for building fast and flexible lists.

Main Features
🙅 Never call performBatchUpdates(_:, completion:) or reloadData() again
🏠 Better architecture with reusable cells and components
🔠 Create collections with multiple data types
🔑 Decoupled diffing algorithm
✅ Fully unit tested
🔍 Customize your diffing behavior for your models
📱 Simply UICollectionView at its core
🚀 Extendable API
🐦 Written in Objective-C with full Swift interop support

IGListKit is built and maintained with ❤️ by Instagram engineering. We use the open source version main branch in the Instagram app.

Multilingual translation

Chinese README

Requirements

Installation

CocoaPods

The preferred installation method is with CocoaPods. Add the following to your Podfile:

pod 'IGListKit', '~> 5.2.0'

Carthage

For Carthage, add the following to your Cartfile:

github "Instagram/IGListKit" ~> 5.2.0

Swift Package Manager

For Swift Package Manager:

To integrate using Xcode:

File -> Swift Packages -> Add Package Dependency

Enter package URL: https://github.com/Instagram/IGListKit, and select the latest release.

For advanced usage, see our Installation Guide.

Getting Started

Try out IGListKit by opening any of the sample apps available in the Examples directory.

Documentation

You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.

To regenerate docs, run ./scripts/build_docs.sh from the root directory in the repo.

Vision

For the long-term goals and "vision" of IGListKit, please read our Vision doc.

Contributing

Please see the CONTRIBUTING file for how to help. At Instagram, we sync the open source version of IGListKit daily, so we're always testing the latest changes. But that requires all changes be thoroughly tested and follow our style guide.

We have a set of starter tasks that are great for beginners to jump in on and start contributing.

License

IGListKit is MIT-licensed.

The files in the /Examples/ directory are licensed under a separate license as specified in each file. Documentation is licensed CC-BY-4.0.

Copyright © Meta Platforms, Inc • Terms of Use • Privacy Policy

IGListKit (Instagram/IGListKit)

Searching Database…

13.1K ·GitHub
这是什么?IGListKit 是一个由数据驱动的 UICollectionView 框架,用于在 iOS 上构建快速且灵活的列表,由 Instagram 工程团队开发和维护。
它是 UIKit 的替代品,还是 UICollectionView 之上的一层?它是构建在 UICollectionView 之上的框架,负责差异计算和批量更新,让你无需自己管理 reloadData();它用 Objective-C 编写,并与 Swift 完全互操作。
我要怎么把它添加到项目里?可以通过 CocoaPods(首选)、Carthage 或 Swift Package Manager 安装,分别将依赖添加到 Podfile、Cartfile 或 Package.swift 中。
需要的最低 OS 和 Swift 版本是多少?需要 Swift 5.1+、iOS 11.0+(tvOS 11.0+),并可互操作回 Swift 3.0+;只有在单独使用差异算法组件时才需要 macOS 10.13+。
我还需要手动调用 performBatchUpdates 或 reloadData 吗?不需要——这个库的核心就是让你不再需要调用 performBatchUpdates(:, completion:) 或 reloadData();差异计算引擎会自动处理更新。
它只能在 iPhone 上使用,还是也支持 tvOS 和 Mac?它面向 iOS 和 tvOS 的集合视图;macOS 仅支持单独使用差异算法组件,不支持完整的 UI 框架。
整个仓库(包括示例)的许可证都一样吗?主库采用 MIT 许可证,但 /Examples/ 下的文件使用单独的许可证,文档则采用 CC-BY-4.0 许可证。
我能在同一个列表中混用不同的数据类型吗?可以,该框架支持在同一个列表中组合多种数据类型,使用可复用的 cell/组件分区来实现。
我能自定义差异计算判断条目是否变化的方式吗?可以,IGListKit 允许你为自己的数据模型自定义差异计算行为,并且差异算法本身与 UI 层是解耦的。
这是用在真实应用中,还是只是个演示库?Instagram 直接在其正式版应用中使用 IGListKit 的开源 main 分支,并每天同步其中的更改。
在哪里能看到它的实际效果?仓库的 Examples 目录中包含示例应用,还有一份入门指南,以及 Ray Wenderlich 的 IGListKit 教程等第三方教程。
Creator
Instagram
Size
9.2 MB
Stars
13.1K
Age
10y
Commits · 90 Days