Summary:
* Issue: [IGListAdapter visibleSectionControllers] calls [UICollectionViewLayout layoutAttributesForElementsInRect:] which can be expensive. And since visibleSectionControllers is called in scrollViewDidScroll, it can add up and take a toll on scroll performance. On an iPhone 7, it's in 2-10% of the main-thread samples (using Time Profiler).
* Fix: IGListDisplayHandler conveniently keeps track of visible IGListSectionControllers, so let's just use that. Now, [IGListAdapter visibleSectionControllers] drops to ~0.3% of samples.
Reviewed By: rnystrom
Differential Revision: D6351474
fbshipit-source-id: 66914db95e08498927bfbceda4d2e9d58cbc7530
Summary:
… source setup too
Issue fixed: #815
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/993
Reviewed By: jeremycohen
Differential Revision: D6264886
Pulled By: rnystrom
fbshipit-source-id: 5159b7989f1d17fd0a7522d986ed6abf012da77f
Summary:
Issue fixed: #997
- [X] 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.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/1000
Differential Revision: D6233518
Pulled By: rnystrom
fbshipit-source-id: ba944c29d094ac83554a97326bc5212ef1fd8671
Summary:
Discovered in rnystrom/GitHawk#781 and introduced in d9a89c9b00. Can't repro in unit test, but have obvious stack traces (see GitHawk issue) that collection is being mutated while enumerated.
No changelog since this is a new fix for 3.2.
Closes https://github.com/Instagram/IGListKit/pull/995
Reviewed By: manicakes
Differential Revision: D6206957
Pulled By: rnystrom
fbshipit-source-id: c42e3688d0f2b31693199f8015b5de48b7b3b9e6
Summary:
Updated the main project lib settings for iOS 11, fixed all errors (which are from warnings-as-errors).
- [x] All tests pass. Demo project builds and runs.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
Closes https://github.com/Instagram/IGListKit/pull/942
Differential Revision: D6161473
Pulled By: rnystrom
fbshipit-source-id: 1fd51d8805f9c6483942b44d750b2756efde9376
Summary:
Adding a new API to support adding 1:many listeners to observe when an `IGListAdapter` finishes performing an update event. It supports:
- `performUpdates:`
- `reloadData...`
- Even handling update triggered from //inside// a section controller
Differential Revision: D6108096
fbshipit-source-id: d0b43d83f1963fdbf6ef388685cbd8f6890177fa
Summary: Fix format warning which occur when using clang 5.0 compiler.
Reviewed By: mzlee
Differential Revision: D5900751
fbshipit-source-id: 4e9aea068aab3d2d882b8fb103a8828e861da97c
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
Summary:
Issue fixed: #700
- [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.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/916
Reviewed By: manicakes
Differential Revision: D5872117
Pulled By: rnystrom
fbshipit-source-id: 420190566c0a822834d8a3b64202f6d807e6a487
Summary:
Added a mechanism to `IGListAdapter` to defer (_queue or execute_) blocks around asking the updater to do batch updates. I discovered a crash where the `_updateCompletionHandler` (private ivar) of `UICollectionView` was not being niled when two batch updates collide. There is an assert in `-[UICollectionView dealloc]` that fires if this block != nil. Took some reverse eng to track down what is happening.
Sadly I cannot reproduce the issue in a unit test _or_ sample app. However I can 100% repro this in my GitHawk app. Applying this patch fixes the problem. I added a unit test that got me _close_ to the state of the crash. Consider this new test future-proofing (also covers the enter/exit/defer stuff).
Also dumping the `UICollectionView` internals confirms that the bad state (`_updateCompletionHandler != nil`) is no longer true.
Issue fixed: #929
Depends on #930
- [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/931
Differential Revision: D5863761
Pulled By: rnystrom
fbshipit-source-id: 496aa939e3a5e83472b26bfb5a4cdc872f58cc0e
Summary:
This implements the `collectionView:didHighlightItemAtIndexPath:` and `collectionView:didUnhighlightItemAtIndexPath:` `UICollectionViewDelegate` APIs and forward the calls to the appropriate `IGListSectionController`.
For the most part, it's doing the same thing as the `collectionView:didDeselectItemAtIndexPath:` calls and tests are also based on that feature.
- Implements `collectionView:didHighlightItemAtIndexPath:` and `collectionView:didUnhighlightItemAtIndexPath:` in IGListAdapter
- Catch those selectors in `IGListAdapterProxy`
- Adds `didHighlightItemAtIndex:` and `didUnhighlightItemAtIndex:` methods to IGListSectionController and friends (supports `IGListBindingSectionController` via its delegate and `IGListStackedSectionController`)
- Tests for changes
Issue fixed: I didn't open one, so none I guess.
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/933
Differential Revision: D5872090
Pulled By: rnystrom
fbshipit-source-id: adc93b68aced3e995f32c291bf607a263cd58edf
Summary:
Found a "bug" when adding some new unit tests. The queue method holds a strong ref to the collection view, and doesn't release it until that block is executed. The adapter may have already been released, holding onto the collection view is wasteful.
- [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/930
Differential Revision: D5861975
Pulled By: rnystrom
fbshipit-source-id: 986ead725839d39b30daadf92675b397f8794520
Summary:
- Fixed#918 by checking `respondsToSelector:` (boo optionals)
- Cut 3.1.1 for immediate publish
- [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/921
Differential Revision: D5748009
Pulled By: rnystrom
fbshipit-source-id: b387b3988abc785f312bc47ac003851283972d7a
Summary:
References #842
We use -[UIScrollViewDelegate scrollViewDidEndDecelerating:] delegate callback in the app we are building to hide/show elements when motion has ended.
Closes https://github.com/Instagram/IGListKit/pull/899
Differential Revision: D5689239
Pulled By: rnystrom
fbshipit-source-id: ea17fe94ccacc5e4f0a9e085e61f8f77cfcea3b4
Summary:
I simply wrote failing tests for `scrollToObject` API for the `ScrollPosition` parameter and then fixed the code.
If we agree that these tests are correct, I don't mind suggesting a fix for it. I think it's the `indexPath`'s row that is hardcoded to `0` that needs to be changed depending on the `scrollPosition` desired. (Done!)
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/861
Differential Revision: D5678607
Pulled By: rnystrom
fbshipit-source-id: ab902b58fe70667ef6133cb05569a2223a668243
Summary:
Followup from #852 since `UIAppearance` doesn't have any effect. Automatically disable prefetching.
Issue fixed: #846
- [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/889
Reviewed By: jeremycohen
Differential Revision: D5651413
Pulled By: rnystrom
fbshipit-source-id: ed602aa4609038bd629c9366c383a23f32fc88df
Summary:
Reverting the revert in D5651413. The origin PR:
https://github.com/Instagram/IGListKit/pull/808/files
Had a small bug in it that wasn't captured via unit tests b/c we use a custom layout. However this should also repro in `IGListCollectionViewLayout`, but none of our tests combine the two atm.
Differential Revision: D5651585
fbshipit-source-id: da6c67cba57ab1aad51535467bff86a21f16f2fa
Summary: Public PR crashes our custom layout b/c requesting # of items doesn't trigger `prepareLayout` on the layout. End up w/ OOB exceptions.
Differential Revision: D5622021
fbshipit-source-id: ecc8cc7bfb38e3ebe7f7433c96b816469f16774c
Summary:
Issue fixed: When a section is empty (0 cells) but has a header/footer supplementary views, calling `scrollToObject:supplementaryKinds:scrollDirection:scrollPosition:animated` wouldn't do anything as the method implementation has an early return if the section doesn't have any cells:

As the section does have supplementary views and is displayed on screen, there's no reason not to scroll to it. This minor change fixes this detail.
Change in internal implementation of one method - all current tests pass. No tests added.
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/808
Differential Revision: D5353285
Pulled By: rnystrom
fbshipit-source-id: 2b6700f98f7d38716d655dfecceb0353d65ef681
Summary:
Issue fixed: #698
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/856
Differential Revision: D5611625
Pulled By: rnystrom
fbshipit-source-id: d9d54e2a10cf0cfae6cff121c20cc8d24d802716
Summary:
Issue fixed: #752
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
This PR generalizes the layout logic in `IGListCollectionViewLayout.mm` to handle horizontally scrolling layouts, mainly by generalizing references to `width`, `height`, `x` and `y` to take scrolling direction into account. This changes the signature of `IGListCollectionViewLayout.init` as well as the names of a few properties, so it would be a breaking change.
I added a couple of unit tests specifically for horizontal layouts -- but held off from adding a horizontal version of *every* unit test for this class, as it would basically double the number of tests. But if you want that, just let me know and I'm happy to do it.
Also let me know if you want me to add a demo VC to the Examples project that uses this new horizontal flow layout -- I have some demo code handy (I used it for testing), but didn't want to clutter up the PR if you didn't want/need it.
Closes https://github.com/Instagram/IGListKit/pull/857
Reviewed By: ryanolsonk
Differential Revision: D5547266
Pulled By: rnystrom
fbshipit-source-id: 6094c45069fc265273d0f95c296fa78e47470384
Summary:
We already had a API to deselect an item through `IGListCollectionContext` this is the support for selecting an item.
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/874
Reviewed By: ryanolsonk
Differential Revision: D5562902
Pulled By: rnystrom
fbshipit-source-id: 756a154607d7d758faddc70ac784e544739f5a93
Summary:
Issue fixed: #643
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/868
Reviewed By: manicakes
Differential Revision: D5553538
Pulled By: rnystrom
fbshipit-source-id: 25d98a28d47a15d494ba530c850e0335d87d758c
Summary:
Issue fixed: #
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/860
Differential Revision: D5442884
Pulled By: rnystrom
fbshipit-source-id: d94832993279b2bae6f57e28fd2ef297bf00e291
Summary:
Adding support for a cell deselection API. Trying to make some headway to move and drag+drop support, but also want better stock `UICollectionView` API support. Will also assist eventual `UITableView` support.
- Added overridable API to `IGListSectionController`
- Support for stacked SC
- Breaking, required protocol for binding SC
Assists #524 and #184
- [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/853
Reviewed By: jeremycohen
Differential Revision: D5425414
Pulled By: rnystrom
fbshipit-source-id: 0b25c125b1f171979a15c3095095fc18b4108be6
Summary:
Preparing another perf test. I noticed in some surfaces that have **massive** updates (8k+ inserts/deletes) that perf can be pretty awful. This is all due to internals of `UICollectionView` trying to create cells and animate a huge blob of changes. Instead, I'm picking a sensible (is it?) default to just skip batch updates and do `reloadData` instead.
Unit tests caught that the `layoutIfNeeded` is required to immediately configure cells.
Depends on D5392713
Reviewed By: jeremycohen
Differential Revision: D5392882
fbshipit-source-id: e429ddb7bca7400908898ebc6f097a489211b03d
Summary:
Adding this API as a standard in preparation for a reloadData fallback test, avoiding massive batch updates stalling the main thread.
Depends on D5392536
Reviewed By: jeremycohen
Differential Revision: D5392713
fbshipit-source-id: 9447bad4b76194ccf26d74c5111624b2fba02efa
Summary:
A new crash! I think this has been a pretty low-firing outlier for some time. Pretty excited to find this. Exposed when adding bg updating as things were likely to collide more frequently, instead of being blocked by main.
Unit test fails w/out the patch applied to the updater.
Depends on D5392269
Reviewed By: jeremycohen
Differential Revision: D5392301
fbshipit-source-id: 5b24d1b41e2a0bdba2b6bc2bfa4f6eeeb36fc4f1
Summary:
Experimenting with a new change. We have observed instances of very large (3k+) lists stalling, even on modern devices. This is especially noticeable if the models being diffed are:
- Immutable
- `performUpdates:` often and models are alloc/init'd each time
- The `isEqualToDiffableObject:` is sort of expensive (many `-[NSString isEqualToString:]` across thousands of models or something)
Instead of just rolling this out, I plan on experimenting with results and seeing how much of a performance and stability boost we gain w/ this. Things to measure:
- Scroll performance
- CPU stalls
- WatchDog kills on older devices
Closes https://github.com/Instagram/IGListKit/pull/841
Reviewed By: amonshiz
Differential Revision: D5364127
Pulled By: rnystrom
fbshipit-source-id: 31d50d2e4b3c7c73584d6ec521a9047efd83f315
Summary:
Improved the documentation so it that the Getting Started guide calls out that you need to set `dataSource`-property of the `IGListAdapter` as I totally misse that.
Closes https://github.com/Instagram/IGListKit/pull/820
Differential Revision: D5353295
Pulled By: rnystrom
fbshipit-source-id: deca1d75fad08f69081033ae1a65302a4f10ba9f
Summary:
UIScrollView can over-scroll, if content offset is too small or too large.
Providing methods to help calculate safe content offsets, given the desired values. Use the safe content offsets in IGListAdapter.
Reviewed By: rnystrom
Differential Revision: D5312473
fbshipit-source-id: d882948940ce08c48f5ff0ab8d997591f62915a8
Summary:
Floating point math loses precision and so comparing two floats that are likely to only differ in the mantissa, and even then by extremely small amounts, is tricky. Exact equality often fails in these cases and asserting on exact equality is probably not necessary.
Closes https://github.com/Instagram/IGListKit/pull/828
Differential Revision: D5310575
Pulled By: rnystrom
fbshipit-source-id: f942489fbe0b2bc5f215329caac8abbae577a830
Summary:
Noticed this randomly debugging. Say you have a completion block that finishes after some async task happens. If you scroll the cell off screen it will return `nil` for `-[UICollectionView indexPathForCell:]`, and the assert will fail (unless the SC is at 0). Quiet some asserts.
Closes https://github.com/Instagram/IGListKit/pull/824
Differential Revision: D5303432
Pulled By: rnystrom
fbshipit-source-id: 64432c43f46d33ce052e6f4fedc094c1fc1f04e1
Summary:
Issue fixed: #814
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/821
Differential Revision: D5301480
Pulled By: rnystrom
fbshipit-source-id: 3a1989aae8de5d03aa803d51b88c65eed999c4bb
Summary:
Issue fixed: #811
I don't think this change needs a item in `CHANGELOG.md` as it's not a real bug fix or enhancement that influences the behaviour of the library.
- [X] All tests pass. Demo project builds and runs.
- [ ] 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.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/812
Differential Revision: D5283118
Pulled By: rnystrom
fbshipit-source-id: 518d38c7f620cef3e85cae5fd4a1c48567bcc48c
Summary:
Issue fixed: #770
- [ ] All tests pass. Demo project builds and runs.
- [ ] 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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/783
Differential Revision: D5137558
Pulled By: rnystrom
fbshipit-source-id: e8c94d5d6d0ffde4f283915a21cd015604938c88
Summary:
Issue fixed: #773
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/776
Differential Revision: D5129343
Pulled By: rnystrom
fbshipit-source-id: 127126545f246e5431636642f203c8150b6a547b
Summary:
Issue fixed: #774
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/787
Differential Revision: D5129345
Pulled By: rnystrom
fbshipit-source-id: 2673191f566a189a1374bfcff8a6639e1cb1fa29
Summary:
This reverts commit cc03917950.
Issue fixed: #772
- [x] All tests pass. Demo project builds and runs.
- [x] 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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/788
Differential Revision: D5129335
Pulled By: rnystrom
fbshipit-source-id: 87efbd13b4ba7132f50d6a4de0430190172fd30c
Summary:
Quick rename before releasing 3.0 to get this API in parity w/ `isFirstSection` and `isLastSection`. My b I should have caught this in review.
Closes#720
Reviewed By: jessesquires, amonshiz
Differential Revision: D5031184
fbshipit-source-id: 1cd7b00c8b32084fecd861e78808eea0d0056337
Summary:
This change will ensure that section controllers have the following properties reset to sensible default values when their owning list adapter is deallocated.
```
isFirstSection = NO
isLastSection = NO
sectionIndex = NSNotFound
```
Issue fixed: #709
- [X] All tests pass. Demo project builds and runs.
- [X] I added tests, an experiment, or detailed why my change isn't tested. (Existing test is updated to ensure this doesn't regress)
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/723
Reviewed By: rnystrom
Differential Revision: D5032445
Pulled By: jessesquires
fbshipit-source-id: 446a30f4206ce02d3ad89fcd9b4586587f396f58
Summary:
Issue fixed: #725
- [x] All tests pass. Demo project builds and runs.
- [ ] 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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/726
Differential Revision: D5032405
Pulled By: jessesquires
fbshipit-source-id: aeda891f09c6aec751daa672258c0b071ea75ae2
Summary:
This adds `NS_SWIFT_NAME` annotations to all public API's to provide cleaner integration into Swift:
- Removes the need to prefix classes in Swift code, instead rely on Swift module name spacing
- Adds more argument labels to C function API's like `IGListDiff([], [], .equality)` => `ListDiff(oldArray: [], newArray: [], option: .equality)`
While this is a large API change it should be as easy as:
- Find and replace `(IGList)([^K])` to `List$2` in Xcode with a scope set to Swift
- Build and follow compiler's auto fix corrections for C API's or any missed renames
I have not updated the documentation to reflect this yet, I am totally willing to do so but before I sink that amount of time into it I wanted to see if the Instagram team is even open to this change!
- [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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
- [ ] I have updated the documentation
Closes https://github.com/Instagram/IGListKit/pull/593
Reviewed By: jessesquires
Differential Revision: D5028039
Pulled By: rnystrom
fbshipit-source-id: b473d874a1f9574e56b2ebaabd5b73d1b57d4bab