mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-06 06:58:26 +00:00
Summary: ## Changes in this pull request Get this fix and make it ready for 4.0 release. ### Checklist - [ ] All tests pass. Demo project builds and runs. - [ ] I added tests, an experiment, or detailed why my change isn't tested. - [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. - [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1393 Reviewed By: iperry90 Differential Revision: D18618773 Pulled By: lorixx fbshipit-source-id: 0360c36d85dc5db15d7e08bdf68ec9c8be992499
418 lines
20 KiB
HTML
418 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>IGListKit Reference</title>
|
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
|
<meta charset='utf-8'>
|
|
<script src="js/jquery.min.js" defer></script>
|
|
<script src="js/jazzy.js" defer></script>
|
|
|
|
</head>
|
|
<body>
|
|
<a title="IGListKit Reference"></a>
|
|
<header>
|
|
<div class="content-wrapper">
|
|
<p><a href="index.html">IGListKit Docs</a> (98% documented)</p>
|
|
<p class="header-right"><a href="https://github.com/Instagram/IGListKit"><img src="img/gh.png"/>View on GitHub</a></p>
|
|
</div>
|
|
</header>
|
|
<div class="content-wrapper">
|
|
<p id="breadcrumbs">
|
|
<a href="index.html">IGListKit Reference</a>
|
|
<img id="carat" src="img/carat.png" />
|
|
IGListKit Reference
|
|
</p>
|
|
</div>
|
|
<div class="content-wrapper">
|
|
<nav class="sidebar">
|
|
<ul class="nav-groups">
|
|
<li class="nav-group-name">
|
|
<a href="Guides.html">Guides</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="best-practices-and-faq.html">Best Practices and FAQ</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="generating-your-models-using-remodel.html">Generating your models using remodel</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="getting-started.html">Getting Started</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="iglistdiffable-and-equality.html">IGListDiffable and Equality</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="installation.html">Installation</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="migration.html">Migration</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="modeling-and-binding.html">Modeling and Binding</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="vision.html">VISION</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="working-with-core-data.html">Working with Core Data</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="working-with-uicollectionview.html">Working with UICollectionView</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="Classes.html">Classes</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListAdapter.html">IGListAdapter</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListAdapterUpdater.html">IGListAdapterUpdater</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListBatchUpdateData.html">IGListBatchUpdateData</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListBindingSectionController.html">IGListBindingSectionController</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListCollectionView.html">IGListCollectionView</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListCollectionViewLayout.html">IGListCollectionViewLayout</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListGenericSectionController.html">IGListGenericSectionController</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListIndexPathResult.html">IGListIndexPathResult</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListIndexSetResult.html">IGListIndexSetResult</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListMoveIndex.html">IGListMoveIndex</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListMoveIndexPath.html">IGListMoveIndexPath</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes.html#/c:objc(cs)IGListReloadDataUpdater">IGListReloadDataUpdater</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListSectionController.html">IGListSectionController</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Classes/IGListSingleSectionController.html">IGListSingleSectionController</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="Constants.html">Constants</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="Constants.html#/c:@IGListKitVersionNumber">IGListKitVersionNumber</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Constants.html#/c:@IGListKitVersionString">IGListKitVersionString</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="Enums.html">Enumerations</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="Enums/IGListAdapterUpdateType.html">IGListAdapterUpdateType</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Enums/IGListDiffOption.html">IGListDiffOption</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Enums/IGListExperiment.html">IGListExperiment</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="Protocols.html">Protocols</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListAdapterDataSource.html">IGListAdapterDataSource</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListAdapterDelegate.html">IGListAdapterDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListAdapterMoveDelegate.html">IGListAdapterMoveDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListAdapterPerformanceDelegate.html">IGListAdapterPerformanceDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListAdapterUpdateListener.html">IGListAdapterUpdateListener</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListAdapterUpdaterDelegate.html">IGListAdapterUpdaterDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListBatchContext.html">IGListBatchContext</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListBindable.html">IGListBindable</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListBindingSectionControllerDataSource.html">IGListBindingSectionControllerDataSource</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListBindingSectionControllerSelectionDelegate.html">IGListBindingSectionControllerSelectionDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListCollectionContext.html">IGListCollectionContext</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListCollectionViewDelegateLayout.html">IGListCollectionViewDelegateLayout</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListCollectionViewLayoutCompatible.html">IGListCollectionViewLayoutCompatible</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListDiffable.html">IGListDiffable</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListDisplayDelegate.html">IGListDisplayDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListScrollDelegate.html">IGListScrollDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListSingleSectionControllerDelegate.html">IGListSingleSectionControllerDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListSupplementaryViewSource.html">IGListSupplementaryViewSource</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListTransitionDelegate.html">IGListTransitionDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListUpdatingDelegate.html">IGListUpdatingDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Protocols/IGListWorkingRangeDelegate.html">IGListWorkingRangeDelegate</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="Type%20Definitions.html">Type Definitions</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions/IGListCollectionScrollingTraits.html">IGListCollectionScrollingTraits</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListCollectionViewBlock">IGListCollectionViewBlock</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListItemUpdateBlock">IGListItemUpdateBlock</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListObjectTransitionBlock">IGListObjectTransitionBlock</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListReloadUpdateBlock">IGListReloadUpdateBlock</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListSingleSectionController.h@T@IGListSingleSectionCellConfigureBlock">IGListSingleSectionCellConfigureBlock</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListSingleSectionController.h@T@IGListSingleSectionCellSizeBlock">IGListSingleSectionCellSizeBlock</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListToObjectBlock">IGListToObjectBlock</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListAdapter.h@T@IGListUpdaterCompletion">IGListUpdaterCompletion</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListUpdatingCompletion">IGListUpdatingCompletion</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="Functions.html">Functions</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="Functions.html#/c:@F@IGListDiff">IGListDiff</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Functions.html#/c:@F@IGListDiffExperiment">IGListDiffExperiment</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Functions.html#/c:@F@IGListDiffPaths">IGListDiffPaths</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Functions.html#/c:@F@IGListDiffPathsExperiment">IGListDiffPathsExperiment</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="Functions.html#/c:IGListExperiments.h@F@IGListExperimentEnabled">IGListExperimentEnabled</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="Structs.html">Structures</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="Structs/IGListCollectionScrollingTraits.html">IGListCollectionScrollingTraits</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<article class="main-content">
|
|
<section>
|
|
<section class="section">
|
|
|
|
<p align="center">
|
|
<img src="https://raw.githubusercontent.com/Instagram/IGListKit/master/Resources/logo-animation.gif" width=400 />
|
|
</p>
|
|
|
|
<p align="center">
|
|
<a href="https://travis-ci.org/Instagram/IGListKit">
|
|
<img src="https://travis-ci.org/Instagram/IGListKit.svg?branch=master&style=flat"
|
|
alt="Build Status">
|
|
</a>
|
|
<a href="https://coveralls.io/github/Instagram/IGListKit?branch=master">
|
|
<img src="https://coveralls.io/repos/github/Instagram/IGListKit/badge.svg?branch=master"
|
|
alt="Coverage Status" />
|
|
</a>
|
|
<a href="https://cocoapods.org/pods/IGListKit">
|
|
<img src="https://img.shields.io/cocoapods/v/IGListKit.svg?style=flat"
|
|
alt="Pods Version">
|
|
</a>
|
|
<a href="https://instagram.github.io/IGListKit/">
|
|
<img src="https://img.shields.io/cocoapods/p/IGListKit.svg?style=flat"
|
|
alt="Platforms">
|
|
</a>
|
|
<a href="https://github.com/Carthage/Carthage">
|
|
<img src="https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat"
|
|
alt="Carthage Compatible">
|
|
</a>
|
|
</p>
|
|
|
|
<hr>
|
|
|
|
<p>A data-driven <code>UICollectionView</code> framework for building fast and flexible lists.</p>
|
|
|
|
<table><thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Main Features</th>
|
|
</tr>
|
|
</thead><tbody>
|
|
<tr>
|
|
<td>🙅</td>
|
|
<td>Never call <code>performBatchUpdates(_:, completion:)</code> or <code>reloadData()</code> again</td>
|
|
</tr>
|
|
<tr>
|
|
<td>🏠</td>
|
|
<td>Better architecture with reusable cells and components</td>
|
|
</tr>
|
|
<tr>
|
|
<td>🔠</td>
|
|
<td>Create collections with multiple data types</td>
|
|
</tr>
|
|
<tr>
|
|
<td>🔑</td>
|
|
<td>Decoupled diffing algorithm</td>
|
|
</tr>
|
|
<tr>
|
|
<td>✅</td>
|
|
<td>Fully unit tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>🔍</td>
|
|
<td>Customize your diffing behavior for your models</td>
|
|
</tr>
|
|
<tr>
|
|
<td>📱</td>
|
|
<td>Simply <code>UICollectionView</code> at its core</td>
|
|
</tr>
|
|
<tr>
|
|
<td>🚀</td>
|
|
<td>Extendable API</td>
|
|
</tr>
|
|
<tr>
|
|
<td>🐦</td>
|
|
<td>Written in Objective-C with full Swift interop support</td>
|
|
</tr>
|
|
</tbody></table>
|
|
|
|
<p><code>IGListKit</code> is built and maintained with ❤️ by <a href="https://engineering.instagram.com/">Instagram engineering</a>.
|
|
We use the open source version <code>master</code> branch in the Instagram app.</p>
|
|
<h2 id='requirements' class='heading'>Requirements</h2>
|
|
|
|
<ul>
|
|
<li>Xcode 9.0+</li>
|
|
<li>iOS 9.0+</li>
|
|
<li>tvOS 9.0+</li>
|
|
<li>macOS 10.11+ <em>(diffing algorithm components only)</em></li>
|
|
<li>Interoperability with Swift 3.0+</li>
|
|
</ul>
|
|
<h2 id='installation' class='heading'>Installation</h2>
|
|
<h3 id='cocoapods' class='heading'>CocoaPods</h3>
|
|
|
|
<p>The preferred installation method is with <a href="https://cocoapods.org">CocoaPods</a>. Add the following to your <code>Podfile</code>:</p>
|
|
<pre class="highlight ruby"><code><span class="n">pod</span> <span class="s1">'IGListKit'</span><span class="p">,</span> <span class="s1">'~> 4.0.0'</span>
|
|
</code></pre>
|
|
<h3 id='carthage' class='heading'>Carthage</h3>
|
|
|
|
<p>For <a href="https://github.com/Carthage/Carthage">Carthage</a>, add the following to your <code>Cartfile</code>:</p>
|
|
<pre class="highlight plaintext"><code>github "Instagram/IGListKit" ~> 4.0.0
|
|
</code></pre>
|
|
|
|
<blockquote>
|
|
<p>For advanced usage, see our <a href="https://instagram.github.io/IGListKit/installation.html">Installation Guide</a>.</p>
|
|
</blockquote>
|
|
<h2 id='getting-started' class='heading'>Getting Started</h2>
|
|
<pre class="highlight shell"><code><span class="gp">$ </span>git clone https://github.com/Instagram/IGListKit.git
|
|
<span class="gp">$ </span><span class="nb">cd </span>IGListKit/
|
|
<span class="gp">$ </span>./scripts/setup.sh
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>Our <a href="https://instagram.github.io/IGListKit/getting-started.html">Getting Started guide</a></li>
|
|
<li>Ray Wenderlich’s <a href="https://www.raywenderlich.com/147162/iglistkit-tutorial-better-uicollectionviews">IGListKit Tutorial: Better UICollectionViews</a></li>
|
|
<li>Our <a href="https://github.com/Instagram/IGListKit/tree/master/Examples">example projects</a></li>
|
|
<li>Ryan Nystrom’s <a href="https://realm.io/news/tryswift-ryan-nystrom-refactoring-at-scale-lessons-learned-rewriting-instagram-feed/">talk at try! Swift NYC</a> (Note: this talk was for an earlier version. Some APIs have changed.)</li>
|
|
<li><a href="https://medium.com/cocoaacademymag/iglistkit-migrating-an-uitableview-to-iglistkitcollectionview-65a30cf9bac9">Migrating an UITableView to IGListCollectionView</a>, by Rodrigo Cavalcante</li>
|
|
<li><a href="https://overflow.buffer.com/2017/04/10/keeping-data-fresh-buffer-ios-asyncdisplaykit-iglistkit-pusher/">Keeping data fresh in Buffer for iOS with AsyncDisplayKit, IGListKit & Pusher</a>, Andy Yates, Buffer</li>
|
|
</ul>
|
|
<h2 id='documentation' class='heading'>Documentation</h2>
|
|
|
|
<p>You can find <a href="https://instagram.github.io/IGListKit">the docs here</a>. Documentation is generated with <a href="https://github.com/realm/jazzy">jazzy</a> and hosted on <a href="https://pages.github.com">GitHub-Pages</a>.</p>
|
|
|
|
<p>To regenerate docs, run <code>./scripts/build_docs.sh</code> from the root directory in the repo.</p>
|
|
<h2 id='vision' class='heading'>Vision</h2>
|
|
|
|
<p>For the long-term goals and <q>vision</q> of <code>IGListKit</code>, please read our <a href="https://github.com/Instagram/IGListKit/blob/master/Guides/VISION.md">Vision</a> doc.</p>
|
|
<h2 id='contributing' class='heading'>Contributing</h2>
|
|
|
|
<p>Please see the <a href="https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md">CONTRIBUTING</a> file for how to help. At Instagram, we sync the open source version of <code>IGListKit</code> daily, so we’re always testing the latest changes. But that requires all changes be thoroughly tested and follow our style guide.</p>
|
|
|
|
<p>We have a set of <a href="https://github.com/Instagram/IGListKit/issues?q=is%3Aissue+is%3Aopen+label%3Astarter-task">starter tasks</a> that are great for beginners to jump in on and start contributing.</p>
|
|
<h2 id='license' class='heading'>License</h2>
|
|
|
|
<p><code>IGListKit</code> is <a href="./LICENSE">MIT-licensed</a>.</p>
|
|
|
|
<p>The files in the <code>/Examples/</code> directory are licensed under a separate license as specified in each file. Documentation is licensed <a href="https://creativecommons.org/licenses/by/4.0/">CC-BY-4.0</a>.</p>
|
|
|
|
</section>
|
|
</section>
|
|
<section id="footer">
|
|
<p>© 2019 <a class="link" href="https://twitter.com/fbOpenSource" target="_blank" rel="external">Instagram</a>. All rights reserved. (Last updated: 2019-11-20)</p>
|
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.12.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
|
</section>
|
|
</article>
|
|
</div>
|
|
</body>
|
|
</div>
|
|
</html>
|