Platforms to show: All Mac Windows Linux Cross-Platform
NSCollectionViewLayoutInvalidationContextMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Collection View | MBS MacControls Plugin | 21.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Invalidation contexts are a way to improve the efficiency of layout operations and must be supported explicitly by the layout object. Instead of invalidating the entire layout, you can create an invalidation layout object that specifies only the portions of the layout that changed. You then pass that invalidation context to the invalidateLayoutWithContext: method of the layout object.
Typically, you ask the layout object to create an invalidation context for you. The NSCollectionViewLayoutMBS class defines methods for creating a supported invalidation context. If you define a custom layout, you can define additional methods for creating invalidation contexts with custom information. Layout objects may also create invalidation contexts in response to specific changes. For example, layout objects automatically create invalidation contexts when you change the collection view’s data source, when you insert or delete items, and when you reload the collection view’s data.
- 6 properties
- property contentOffsetAdjustment as NSPointMBS
- property contentSizeAdjustment as NSSizeMBS
- property invalidateDataSourceCounts as Boolean
- property invalidatedDecorationIndexPaths as Dictionary
- property invalidatedSupplementaryIndexPaths as Dictionary
- property invalidateEverything as Boolean
- 5 methods
- method Constructor
- method invalidateDecorationElementsOfKind(elementKind as String, indexPaths() as NSIndexPathMBS)
- method invalidatedItemIndexPaths as NSIndexPathMBS()
- method invalidateItemsAtIndexPaths(indexPaths() as NSIndexPathMBS)
- method invalidateSupplementaryElementsOfKind(elementKind as String, indexPaths() as NSIndexPathMBS)
Sub classes:
Some methods using this class:
- NSCollectionViewLayoutMBS.invalidateLayoutWithContext(context as NSCollectionViewLayoutInvalidationContextMBS)
- NSCollectionViewLayoutMBS.NewInvalidationContext as NSCollectionViewLayoutInvalidationContextMBS
The items on this page are in the following plugins: MBS MacControls Plugin.
NSCollectionViewLayoutAttributesMBS - NSCollectionViewLayoutMBS