invalidationContext(forBoundsChange:)
Returns an invalidation context object that defines the portions of the layout that need to be updated.
Declaration
func invalidationContext(forBoundsChange newBounds: NSRect) -> NSCollectionViewLayoutInvalidationContextParameters
- newBounds:
The new bounds for the collection view.
Return Value
An invalidation context that describes the changes to be made. This value is never nil.
Discussion
The default implementation of this method creates an instance of the class returned by the invalidationContextClass method and initializes it using its init() method. Subclasses can override this method and configure additional properties of the invalidation context. In your implementation, you must call super first to get the context object; you can then configure that object and return it.