Instance Method

invalidateLayout

Invalidates all layout information and triggers a layout update.

Declaration

- (void)invalidateLayout;

Discussion

Call this method when you make changes that require updating all of the current layout information. This method marks the layout as invalid and returns right away, so you can call this method multiple times from the same block of code without triggering multiple layout updates. During the next update cycle, the collection view requests new layout information and updates its contents accordingly.

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

See Also

Invalidating the Layout

- invalidateLayoutWithContext:

Invalidates specific parts of the layout using the specified context object.

invalidationContextClass

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

- shouldInvalidateLayoutForBoundsChange:

Returns a Boolean indicating whether a bounds change triggers a layout update.

- shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:

Returns a Boolean indicating whether changes to a cell’s layout attributes trigger a larger layout update.

- invalidationContextForBoundsChange:

Returns an invalidation context object that defines the portions of the layout that need to be updated.

- invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:

Returns an invalidation context object that defines the portions of the layout that need to be updated.