| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| 5.0.0 source code.tar.gz | 2024-05-13 | 2.6 MB | |
| 5.0.0 source code.zip | 2024-05-13 | 3.0 MB | |
| README.md | 2024-05-13 | 13.4 kB | |
| Totals: 3 Items | 5.5 MB | 0 | |
5.0.0 is finally here! 🎉🎊🥳
This version brings all of the enhancements Instagram has been adding to IGListKit over the years since 4.0.0. We're incredibly excited for everyone to try it out and let us know what they think. If you encounter any issues, please let us know by opening a GitHub ticket. Thank you so much to all of the internal and external contributors who submitted code, reported issues and everything else that made this release possible.
Breaking Changes
-
Changed iOS deployment target to 11.0 and macOS deployment target to 10.13 Kent Sutherland (#1573)
-
Removed unneeded diffing functions
IGListDiffExperiment(...)andIGListDiffPathsExperiment(...). Maxime Ollivier (254c041) -
ListSectionController.collectionContextandListGenericSectionController.objectare now implicitly-unwrapped optionals in Swift. Nate Stedman (a6526ce) -
The argument of
IGListGenericSectionController's-didUpdateToObject:is now generic, notid. Nate Stedman (a6526ce) -
Updated
IGListUpdatingDelegate, including a new method to safely perform[IGListAdapter setDataSource:]and changes to-performUpdateWithCollectionViewBlockthat allows section-controllers to be created before the diffing (and therefore use a more accuratetoObjectsarray) Maxime Ollivier (43af883):::objc // OLD
- (void)performUpdateWithCollectionViewBlock:(IGListCollectionViewBlock)collectionViewBlock fromObjects:(nullable NSArray<id \<IGListDiffable>> *)fromObjects toObjectsBlock:(nullable IGListToObjectBlock)toObjectsBlock animated:(BOOL)animated objectTransitionBlock:(IGListObjectTransitionBlock)objectTransitionBlock completion:(nullable IGListUpdatingCompletion)completion;
// NEW
- (void)performUpdateWithCollectionViewBlock:(IGListCollectionViewBlock)collectionViewBlock animated:(BOOL)animated sectionDataBlock:(IGListTransitionDataBlock)sectionDataBlock applySectionDataBlock:(IGListTransitionDataApplyBlock)applySectionDataBlock completion:(nullable IGListUpdatingCompletion)completion;
// NEW
- (void)performDataSourceChange:(IGListDataSourceChangeBlock)block;
-
Removed
allowsBackgroundReloadingfromIGListAdapterUpdaterbecause it's causing performance issues and other bugs. Maxime Ollivier (032e1b0) -
Introducing
allowsBackgroundDiffingonIGListAdapterUpdater! This property lets the updater perform the diffing on a background thread. Originally introduced by Ryan Nystrom a while back. Maxime Ollivier (9a11f6) -
Updated
scrollToObject:method inIGListAdapterto include a new parameteradditionalOffsetto handle shifting the final scroll position by some vertical or horizontal offset depending on the scroll direction. This allows the object to be shown at the correct position when it is scrolled to in a list with sticky headers. Anna Tang (f2166c3):::objc // OLD
- (void)scrollToObject:(id)object supplementaryKinds:(nullable NSArray<NSString *> *)supplementaryKinds scrollDirection:(UICollectionViewScrollDirection)scrollDirection scrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated;
// NEW
- (void)scrollToObject:(id)object supplementaryKinds:(nullable NSArray<NSString *> *)supplementaryKinds scrollDirection:(UICollectionViewScrollDirection)scrollDirection scrollPosition:(UICollectionViewScrollPosition)scrollPosition additionalOffset:(CGPoint)additionalOffset animated:(BOOL)animated;
-
Unshipped the
IGListExperimentSkipViewSectionControllerMapexperiment as it was no longer being used. Maxime Ollivier (99e24af) -
Unshipped the
IGListExperimentSkipPerformUpdateIfPossibleexperiment since it wasn't considered safe enough. Maxime Ollivier (b3a22ad)
Enhancements
-
Added
traitCollectionproperty toIGListAdapterin order to access the current trait collection of the underlying collection view. Sash Zats (53a96a9) -
Added
viewForSupplementaryElementOfKind:atIndex:sectionController:toIGListAdapter. ryanmathews (c708a10) -
Replaced usage of
method_exchangeImplementationswithclass_replaceMethodfor increased performance. Saagar Jha (#1583) -
Added
shouldDeselectItemAtIndex:toIGListSectionController. bladeofky (b22a10e) -
Added
shouldSelectItemAtIndex:toIGListSectionController. dirtmelon (#1479) -
Added Mac Catalyst support. Petro Rovenskyy (#1487)
-
Introduce
IGListSwiftKit, with Swift refinements fordequeueReusableCellOfClassmethods. Koen Punt (#1388). -
Added
APPLICATION_EXTENSION_API_ONLYsupport forIGListDiffKitPeter Meyers (#1422) -
Improved performance by deferring requesting objects from the
IGListAdapterDataSourceuntil just before diffing is executed. If n updates are coalesced into one, this results in just a single request for objects from the data source. Shipped with experimentIGListExperimentDeferredToObjectCreationfrom Ryan Nystrom. Maxime Ollivier (7fc4384) -
Improved performance by using
reloadDatawhen there are too many diffing updates. Shipped with experimentIGListExperimentReloadDataFallbackfrom Ryan Nystrom. Maxime Ollivier (86ecc60) -
Small performance improvement by replacing
NSSetwithNSArrayduring the data update to avoid unnecessary hashing, especially when dealing with lots of large objects with non trivial hashes. Maxime Ollivier (c0cf10d) -
Lazy initialize the
-emptyViewForListAdapter:Maxime Ollivier (29d4640) -
Updated
IGListAdapterUpdaterto be safer, more performant, and better organized! Maxime Ollivier (247e7ca) - Safely handles
[IGListAdapter setDataSource:]by also invalidating theUICollectionViewdata. - Safely handles
[IGListAdapter setCollectionView:]by cancelling on-going transactions. - Safely handles returning nil
IGListSectionControllerfromIGListAdapterDataSourceby dumping objects that don't have a controller before the diffing. - Checks that the
UICollectionViewsection count matches theIGListAdapterbefore committing the update, otherwise fallback to a reload. - Schedules an update block (
dispatch_async) only when needed, instead of scheduling on every single call to-performUpdateWithCollectionViewBlock. - Wraps each update in a
transactionthat can be easily cancelled. - Uses methods instead of blocks to make the callstack easier to read in crash reports.
-
Unblocks
IGListExperimentBackgroundDiffing -
The
IGListExperimentFixCrashOnReloadObjectsexperiment succeeded and has officially been implemented into IGListKit. Maxime Ollivier (99e24af) -
Added
IGListExperimentKeepPointerToCollectionViewDataSourceexperiment as a potential solution for certain crashes being periodically observed. -
Added
IGListExperimentDisableAnimationOnUpdatesexperiment to optionally disable update animations inIGListAdapterinstances. (eeb5208)
Fixes
-
Don't crash if you use
IGListSectionControllerwithout a subclass Maxime Ollivier (6ea2b91) -
Testing crash fix when calling
-[IGListAdapter reloadObjects ...]during an update Maxime Ollivier (cd3f84f) -
Repaired Swift Package Manager support. Petro Rovenskyy (#1487)
-
IGListCollectionViewLayoutshould get the section/index counts viaUICollectionViewto stay in sync, instead of thedataSourceMaxime Ollivier (677ce77) -
Remove
[collectionView layoutIfNeeded]before scrolling in[IGListAdapter scrollToObject...]to avoid creating off-screen cells. Maxime Ollivier (ea03bc9) -
Remove
[collectionView layoutIfNeeded]before updating in[IGListAdapterUpdater performBatchUpdates...]to fix occasional glitches. Maxime Ollivier (aca18c7) -
Fixed
IGListAdapterUpdaterDelegateby 1) callingwillReloadDataWithCollectionViewon fallback reloads and 2) making surewillPerformBatchUpdatesWithCollectionViewis only called when performing a batch update. Maxime Ollivier (29bf582) -
Fixed missing update when calling
performUpdatesAnimatedmultiple times quickly and using thereloadDataFallback(). Maxime Ollivier (a70d2d7) -
Request the
UICollectionViewuntil just-before we update. This way if theUICollectionViewis changed between update-queue and execution, we guarantee the update is performed on the correct view. Ship with experimentIGListExperimentGetCollectionViewAtUpdatefrom Ryan Nystrom. Maxime Ollivier (34c935c) -
Fixed unsigned integer overflow handling in
IGListBatchUpdateDataJason Hsu (#1299) -
Fixed when collection views wouldn't recalculate its layout when its bound changes. Sash Zats (d220f8a)
-
Fixed when calling
invalidateLayoutonIGListCollectionViewLayoutwouldn't perform layout recalculation. Tim Oliver (ffd51e6)