Skip to content

Latest commit

 

History

History
218 lines (127 loc) · 14.9 KB

CHANGELOG.md

File metadata and controls

218 lines (127 loc) · 14.9 KB

CHANGELOG

The changelog for IGListKit. Also see the releases on GitHub.

3.0.0 (upcoming release)

This release closes the 3.0.0 milestone.

Breaking Changes

  • Updated didSelect delegate call in IGListSingleSectionControllerDelegate to include object. Sherlouk (#397)
// OLD
- (void)didSelectSingleSectionController:(IGListSingleSectionController *)sectionController;

// NEW
- (void)didSelectSectionController:(IGListSingleSectionController *)sectionController
                        withObject:(id)object;
  • IGListUpdatingDelegate now conforms to NSObject, bringing it in line with other framework protocols. Adlai Holler (#435)

  • Changed hasChanges methods in IGListIndexPathResult and IGListIndexSetResult to read-only properties. Bofei Zhu (#453)

  • Replaced IGListGridCollectionViewLayout with IGListCollectionViewLayout. Ryan Nystrom (#482, #450)

  • Renamed IGListAdapterUpdaterDelegate method to listAdapterUpdater:didPerformBatchUpdates:collectionView:. Vincent Peng (#491)

Enhancements

  • Added -[IGListAdapter visibleCellsForObject:] API. Sherlouk (#442)

  • Added -[IGListAdapter sectionControllerForSection:] API. Adlai-Holler (#477)

  • You can now manually move items (cells) within a section controller, ex: [self.collectionContext moveInSectionController:self fromIndex:0 toIndex:1]. Ryan Nystrom (#418)

  • Invalidate the layout of a section controller and control the transition with UIView animation APIs. Ryan Nystrom (#499)

  • Added -[IGListAdapter visibleIndexPathsForSectionController:] API. Malecks (#465)

  • Added IGListBindingSectionController which automatically binds view models to cells and animates updates at the cell level. Ryan Nystrom (#494)

Fixes

  • Gracefully handle a nil section controller returned by an IGListAdapterDataSource. Ryan Nystrom (#488)

  • Fix bug where emptyView's hidden status is not updated after the number of items is changed with insertInSectionController:atIndexes: or related methods. Peter Edmonston (#395)

  • Fix bug where IGListStackedSectionController's children need to know numberOrItems before didUpdate is called. (#348)

  • Fix bug where -[UICollectionViewCell ig_setStackedSectionControllerIndex:] should use OBJC_ASSOCIATION_COPY_NONATOMIC for NSNumber. PhilCai (#424)

  • Fix potential bug with suppressing animations (by passing NO) during -[IGListAdapter performUpdatesAnimated: completion:] where user would see UI glitches/flashing. Jesse Squires (019c990)

  • Fix bug where scroll position would be incorrect in call to -[IGListAdapter scrollToObject:supplementaryKinds:scrollDirection:scrollPosition:animated: with scrollDirection/scrollPosition of UICollectionViewScrollDirectionVertical/UICollectionViewScrollPositionCenteredVertically or UICollectionViewScrollDirectionHorizontal/UICollectionViewScrollPositionCenteredHorizontally and with a collection view with nonzero contentInset. David Yamnitsky (5cc0fcd)

  • Fix a crash when reusing collection views between embedded IGListAdapters. Ryan Nystrom (#517)

  • Only collect batch updates when explicitly inside the batch update block, execute them otherwise. Fixes dropped updates. Ryan Nystrom (#494)

2.1.0

This release closes the 2.1.0 milestone.

Enhancements

Fixes

  • Avoid UICollectionView crashes when queueing a reload and insert/delete on the same item as well as reloading an item in a section that is animating. Ryan Nystrom (#325)

  • Prevent adapter data source from deallocating after queueing an update. Ryan Nystrom (4cc91a2)

  • Fix out-of-bounds bug when child section controllers in a stack remove cells. Ryan Nystrom (#358)

  • Fix a grid layout bug when item has full-width and iter-item spacing is not zero. Bofei Zhu (#361)

2.0.0

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 from isEqual: to isEqualToDiffableObject: (ab890fc)

  • The default NSObject<IGListDiffable> category was removed and replaced with NSString<IGListDiffable> and NSNumber<IGListDiffable> categories. All other models will need to conform to IGListDiffable. (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;

Fixes

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 to IGListSectionController (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;
// IGListCollectionContext
- (void)scrollToSectionController:(IGListSectionController<IGListSectionType> *)sectionController
                          atIndex:(NSInteger)index
                   scrollPosition:(UICollectionViewScrollPosition)scrollPosition
                         animated:(BOOL)animated;

Fixes

  • Fixed -[IGListAdapter reloadDataWithCompletion:] not returning early when collectionView or dataSource is nil and completion is nil. 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

1.0.0

Initial release. 🎉