Contents

invalidateLayout(with:)

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

Declaration

func invalidateLayout(with context: UICollectionViewLayoutInvalidationContext)

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