Commit graph

5 commits

Author SHA1 Message Date
Ryan Nystrom
79348164a7 Auto diffing section controller
Summary:
Started work on the plane to get this moving since #418  is up and ready to land. We'll likely need to spend some time fleshing out the API of this, and I think I'll split it up into a couple different PRs once ready for review. Putting this up now to get early feedback.

This adds an auto-diffing section controller as outlined in #38. There are several key parts:

- Subclass a new section controller `IGListAutoSectionController` (naming wip)
- Connect a data source
- Implement the data source methods that do 3 things:
  - Given a top-level object, transform it into an array of **diffable** view models
  - Given a view model, return a cell
  - Given a view model, return a size for a cell
- A new protocol for the cell `IGListBindable` so that we can control when the cell is updated w/ the view model.
  - The most important part of this is that it unlocks moving and reloading a cell, which you can't do w/ `UICollectionView`

- [ ] Unit test `reloadObjects:`
- [x] Add
Closes https://github.com/Instagram/IGListKit/pull/494

Reviewed By: amonshiz

Differential Revision: D4696966

Pulled By: rnystrom

fbshipit-source-id: f21b8341b3ed4389f2a4a106d0d316f481ba6943
2017-03-15 07:47:24 -07:00
Jesse Squires
69c3cc73e7 macOS support follow-up work, #270
Summary:
Progress on #270.

- Setup basic, empty example project
- Setup test target and add tests that work for macOS
- Update changelog
- Update travis-ci
Closes https://github.com/Instagram/IGListKit/pull/328

Differential Revision: D4325876

Pulled By: jessesquires

fbshipit-source-id: 342963ce5103d3980c697655e1f1a9b6f3f1c520
2016-12-13 23:14:07 -08:00
Guilherme Rambo
3da0a6bf84 macOS support
Summary:
Added support for macOS. The macOS target includes only the core diffing functionality so `IGListDiff` can be used on macOS apps.

I have not added the tests because I don't know how you're setting them up, maybe the same tests can be used by adding some `#if os(...)`s to the test files.

I have tested integration on iOS, tvOS and macOS using both Carthage and Cocoapods.
Closes https://github.com/Instagram/IGListKit/pull/235

Differential Revision: D4325423

Pulled By: jessesquires

fbshipit-source-id: 871bf08410061306004872f5feb7a09d362b6bc1
2016-12-13 20:44:07 -08:00
Jesse Squires
e4a47193c1 Add tvOS support. Close #118
Summary:
Closes #118.

- Add tvOS framework + test targets
- Add shared scheme `IGListKit-tvOS`
- Update `Podfile` and `.podspec`
- Update `.travis.yml`
- Update `CHANGELOG`
- Update `README`
- Run `pod install` and check-in updates

- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/137

Differential Revision: D4101583

Pulled By: rnystrom

fbshipit-source-id: f2736f16ad9f61ad5348c5e93571f3b752deec98
2016-10-29 14:44:11 -07:00
FBShipIt
cdc796746a Initial commit
fbshipit-source-id: c38b897b9e2b87c782e0e01b0145d9189dc7f9d8
2016-10-11 10:12:17 -04:00