Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSCollectionViewLayoutMBS class.

NSCollectionViewLayoutMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The constructor.

NSCollectionViewLayoutMBS.invalidateLayout

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Invalidates all layout information and triggers a layout update.

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.

NSCollectionViewLayoutMBS.invalidateLayoutWithContext(context as NSCollectionViewLayoutInvalidationContextMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Invalidates specific parts of the layout using the specified context object.

context: The context object indicating which parts of the layout need to be updated.

Call this method when you make changes that need to be reflected by the collection view, but which do not require the replacement of all of the layout information. You use this method to minimize the work performed by the layout object. Instead of optimizing everything, the specified context object indicates which parts of the layout need to be recomputed. All other layout information is left alone.
When implementing a custom layout, you can override this method and use it to process information provided by a custom invalidation context. You are not required to provide a custom invalidation context but might do so if you are able to provide additional properties that can help optimize layout updates. If you override this method, you must call super at some point in your implementation.

The items on this page are in the following plugins: MBS MacControls Plugin.


The biggest plugin in space...