Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout invalidation API #499

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Source/IGListCollectionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,14 @@ NS_ASSUME_NONNULL_BEGIN
- (void)reloadSectionController:(IGListSectionController<IGListSectionType> *)sectionController;

/**
Invalidate the backing UICollectionViewLayout for all items in the section controller.
Invalidate the backing `UICollectionViewLayout` for all items in the section controller.

@param sectionController The section controller who needs invalidating.
@param sectionController The section controller that needs invalidating.
@param completion An optional completion block to execute when the updates are finished.

@discussion This method can be wrapped in UIView animation APIs to control the duration of the animation, perform
without animations, or use springs.
@note This method can be wrapped in `UIView` animation APIs to control the duration or perform without animations. This
will end up calling `-[UICollectionView performBatchUpdates:completion:] internally, so invalidated changes may not be
reflected in the cells immediately.
*/
- (void)invalidateLayoutForSectionController:(IGListSectionController<IGListSectionType> *)sectionController
completion:(nullable void (^)(BOOL finished))completion;
Expand Down