Instance Method

invalidateLayoutWithContext:

Invalidates the current layout using the information in the provided context object.

Declaration

- (void)invalidateLayoutWithContext:(UICollectionViewLayoutInvalidationContext *)context;

Parameters

context

The context object indicating which parts of the layout to refresh.

Discussion

The default implementation of this method optimizes the layout process using the base properties of the UICollectionViewLayoutInvalidationContext class. If you define a custom context object for your layout, override this method and apply any custom properties of the context object to your layout computations.

If you override this method, you must call super at some point in your implementation.

See Also

Invalidating the Layout

- invalidateLayout

Invalidates the current layout and triggers a layout update.

invalidationContextClass

Returns the class to use when creating an invalidation context for the layout.

- shouldInvalidateLayoutForBoundsChange:

Asks the layout object if the new bounds require a layout update.

- invalidationContextForBoundsChange:

Returns a context object that defines the portions of the layout that should change when a bounds change occurs.

- shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:

Asks the layout object if changes to a self-sizing cell require a layout update.

- invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:

Returns a context object that identifies the portions of the layout that should change in response to dynamic cell changes.

- invalidationContextForInteractivelyMovingItems:withTargetPosition:previousIndexPaths:previousPosition:

Returns a context object that identifies the items that are being interactively moved in the layout.