Platforms to show: All Mac Windows Linux Cross-Platform
NSCollectionViewFlowLayoutMBS class
Super class: NSCollectionViewLayoutMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Collection View | MBS MacControls Plugin | 21.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
In a flow layout, the first item is positioned in the top-left corner and other items are laid out either horizontally or vertically based on the scroll direction, which is configurable. Items may be the same size or different sizes, and you may use the flow layout object or the collection view’s delegate object to specify the size of items and the spacing around them. The flow layout also lets you specify custom header and footer views for each section.
You can use an NSCollectionViewFlowLayoutMBS object as-is or subclass it to modify more aspects of the layout behavior. There are several ways to customize the basic layout behavior that do not require subclassing. For example, you can use a delegate object to change the size and spacing of items dynamically. Subclassing is appropriate for more advanced layout changes, such as adding supplementary views or decoration views, supporting custom layout attributes, or customizing the layout animations when inserting or deleting items.
see also
https://developer.apple.com/documentation/appkit/nscollectionviewflowlayout
Subclass of the NSCollectionViewLayoutMBS class.
- 11 properties
- property estimatedItemSize as NSSizeMBS
- property footerReferenceSize as NSSizeMBS
- property headerReferenceSize as NSSizeMBS
- property itemSize as NSSizeMBS
- property minimumInteritemSpacing as Double
- property minimumLineSpacing as Double
- property scrollDirection as Integer
- property sectionFootersPinToVisibleBounds as Boolean
- property sectionHeadersPinToVisibleBounds as Boolean
- property sectionInset as NSEdgeInsetsMBS
- property sectionAtIndexIsCollapsed(sectionIndex as Integer) as Boolean
- 3 methods
- method collapseSectionAtIndex(sectionIndex as Integer)
- method Constructor
- method expandSectionAtIndex(sectionIndex as Integer)
- 2 shared methods
- shared method ElementKindSectionFooter as String
- shared method ElementKindSectionHeader as String
- 2 constants
Scroll Directions
Constant | Value | Description |
---|---|---|
ScrollDirectionHorizontal | 1 |
The layout scrolls content horizontally. |
ScrollDirectionVertical | 0 |
The layout scrolls content vertically. |
Super class NSCollectionViewLayoutMBS
- property collectionView as NSCollectionViewMBS
- 3 methods
- method Constructor
- method invalidateLayout
- method invalidateLayoutWithContext(context as NSCollectionViewLayoutInvalidationContextMBS)
- 2 shared methods
- shared method NewInvalidationContext as NSCollectionViewLayoutInvalidationContextMBS
- shared method NewLayoutAttributes as NSCollectionViewLayoutAttributesMBS
This class has no sub classes.
Some examples using this class:
Blog Entries
The items on this page are in the following plugins: MBS MacControls Plugin.
NSCollectionViewFlowLayoutInvalidationContextMBS - NSCollectionViewGridLayoutMBS