A data-driven UICollectionView framework for building fast and flexible lists.
Find a file
Ryan Nystrom b2860c3604 Fix scrollToObject: bug when scrolling to bottom with content inset
Summary:
This has been around forever, surprised we've never run into it. Instagram doesn't really use the `bottom` position except for one place that is already at the bottom of a view. Looks like this bug has just been hanging around quietly for ages.

`UIScrollView` takes into account the content inset when changing the content offset. Doing math w/ the inset is both useless and incorrect.

Issue fixed: #932

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
Closes https://github.com/Instagram/IGListKit/pull/940

Differential Revision: D5881117

Pulled By: rnystrom

fbshipit-source-id: 5c9af4b6f8b59be977491ba734e9b0fa3c538cb9
2017-09-21 11:16:32 -07:00
.github Update ISSUE_TEMPLATE.md 2017-04-26 13:17:23 -07:00
docs Fix binding SC deselection crash and publish 3.1.1 2017-08-31 12:51:10 -07:00
Examples Removed empty methods 2017-09-21 07:17:01 -07:00
Guides Create binding and modeling guide/tutorial 2017-08-21 14:46:53 -07:00
IGListKit.xcodeproj Dedupe view models in IGListBindingSectionController 2017-09-20 18:04:11 -07:00
IGListKit.xcworkspace add Xcode9 fileheader 2017-08-11 09:07:52 -07:00
Pods Fixup project, update README and guides 2017-05-12 09:47:20 -07:00
Resources Create binding and modeling guide/tutorial 2017-08-21 14:46:53 -07:00
scripts Updated script to pin SwiftLint version 2017-07-12 12:22:40 -07:00
Source Fix scrollToObject: bug when scrolling to bottom with content inset 2017-09-21 11:16:32 -07:00
Tests Fix scrollToObject: bug when scrolling to bottom with content inset 2017-09-21 11:16:32 -07:00
.gitignore Nitpicky comment fixes 2017-03-31 13:01:40 -07:00
.slather.yml Ignore Xcode dir in coverage reports 2016-11-20 07:58:58 -08:00
.travis.yml Add Gemfile and setup travis to cache the dependencies 2017-08-04 15:08:15 -07:00
CHANGELOG.md Fix scrollToObject: bug when scrolling to bottom with content inset 2017-09-21 11:16:32 -07:00
Dangerfile warn if no milestone on PR 2017-08-11 12:46:29 -07:00
Gemfile Add Gemfile and setup travis to cache the dependencies 2017-08-04 15:08:15 -07:00
Gemfile.lock Add Gemfile and setup travis to cache the dependencies 2017-08-04 15:08:15 -07:00
IGListKit.podspec Fix binding SC deselection crash and publish 3.1.1 2017-08-31 12:51:10 -07:00
LICENSE.md Initial commit 2016-10-11 10:12:17 -04:00
PATENTS.md Initial commit 2016-10-11 10:12:17 -04:00
Podfile Fixup project, update README and guides 2017-05-12 09:47:20 -07:00
Podfile.lock Fixup project, update README and guides 2017-05-12 09:47:20 -07:00
README.md Regenerate docs, move docs build script 2017-05-31 21:01:49 -07:00

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 master branch in the Instagram app.

Requirements

  • Xcode 8.0+
  • iOS 8.0+
  • tvOS 9.0+
  • macOS 10.10+ (diffing algorithm components only)
  • Interoperability with Swift 3.0+

Installation

CocoaPods

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

pod 'IGListKit', '~> 3.0'

Carthage

For Carthage, add the following to your Cartfile:

github "Instagram/IGListKit" ~> 3.0

For advanced usage, see our Installation Guide.

Getting Started

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 BSD-licensed. We also provide an additional patent grant.

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