This release closes the 2.0.0 milestone. We've increased test coverage to 97%. Thanks to the 27 contributors who helped with this release!
You can find a migration guide here to assist with migrating between 1.0 and 2.0.
Breaking Changes
- Diff result method on
IGListIndexPathResult
changed.-resultWithUpdatedMovesAsDeleteInserts
was removed and replaced with-resultForBatchUpdates
(b5aa5e3)
// OLD
- (IGListIndexPathResult *)resultWithUpdatedMovesAsDeleteInserts;
// NEW
- (IGListIndexPathResult *)resultForBatchUpdates;
IGListDiffable
equality method changed fromisEqual:
toisEqualToDiffableObject:
(ab890fc)- The default
NSObject<IGListDiffable>
category was removed and replaced withNSString<IGListDiffable>
andNSNumber<IGListDiffable>
categories. All other models will need to conform toIGListDiffable
. (3947600) - Added support for specifying an end position when scrolling. Bofei Zhu (#196). The
IGListAdapter
scrolling method changed:
// OLD
- (void)scrollToObject:(id)object
supplementaryKinds:(nullable NSArray<NSString *> *)supplementaryKinds
scrollDirection:(UICollectionViewScrollDirection)scrollDirection
animated:(BOOL)animated;
// NEW
- (void)scrollToObject:(id)object
supplementaryKinds:(nullable NSArray<NSString *> *)supplementaryKinds
scrollDirection:(UICollectionViewScrollDirection)scrollDirection
scrollPosition:(UICollectionViewScrollPosition)scrollPosition
animated:(BOOL)animated;
- Changed
NSUInteger
toNSInteger
in all public APIs. Suraya Shivji (#200)
Enhancements
- Added support for supplementaryViews created from nibs. Rawlinxx (#90)
- Added support for cells created from nibs. Sven Bacia (#56)
- Added an additional initializer for
IGListSingleSectionController
to be able to support single sections created from nibs. An example can be found here. (#56)
- (instancetype)initWithNibName:(NSString *)nibName
bundle:(nullable NSBundle *)bundle
configureBlock:(IGListSingleSectionCellConfigureBlock)configureBlock
sizeBlock:(IGListSingleSectionCellSizeBlock)sizeBlock;
- Added
-isFirstSection
and-isLastSection
APIs toIGListSectionController
(316fbe2) - Added support for cells and supplementaryViews created from storyboard. There's a new required method on the
IGListCollectionContext
protocol to do this. Bofei Zhu (#92)
// IGListCollectionContext
- (__kindof UICollectionViewCell *)dequeueReusableCellFromStoryboardWithIdentifier:(NSString *)identifier
forSectionController:(IGListSectionController<IGListSectionType> *)sectionController
atIndex:(NSInteger)index;
- Added
tvOS
support. Jesse Squires (#137) - Added
-[IGListAdapter visibleObjects]
API. Ryan Nystrom (386ae07) - Added
-[IGListAdapter objectForSectionController:]
API. Ayush Saraswat (#204) - Added
IGListGridCollectionViewLayout
, a section-based grid layout. Bofei Zhu (#225) - Added support for scrolling to an index in a section controller from within that section controller. There's a new required method on the
IGListCollectionContext
protocol to do this. Jesse Squires (e5afb5b)
// IGListCollectionContext
- (void)scrollToSectionController:(IGListSectionController<IGListSectionType> *)sectionController
atIndex:(NSInteger)index
scrollPosition:(UICollectionViewScrollPosition)scrollPosition
animated:(BOOL)animated;
Fixes
- Fixed
-[IGListAdapter reloadDataWithCompletion:]
not returning early whencollectionView
ordataSource
isnil
andcompletion
isnil
. Ben Asher (#51) - Prevent
UICollectionView
bug when accessing a cell during working range updates. Ryan Nystrom (#216) - Skip reloading for objects that are not found when calling
-[IGListAdapter reloadObjects:]
. Ryan Nystrom (ca15e29) - Fixes a crash when a reload is queued for an object that is deleted in the same runloop turn. Ryan Nystrom (7c3d499)
- Fixed a bug where
IGListStackSectionController
would only set its supplementary source once. Ryan Nystrom (#286) - Fixed a bug where
IGListStackSectionController
passed the wrong section controller for will-drag scroll events. Ryan Nystrom (#286) - Fixed a crash when deselecting a cell through a child section controller in an
IGListStackSectionController
. Ryan Nystrom (#295)
Documentation
- We now have 100% documentation coverage. Docs been refined and clarified. Jesse Squires (#207)
- Added new Guides: Getting Started, Migration
- Added examples for Today & iMessage extensions. Sherlouk (#112)
- Added
tvOS
example pack. Sherlouk (#141)