Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSCollectionViewFlowLayoutMBS class.

NSCollectionViewFlowLayoutMBS.estimatedItemSize as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The estimated size of items in the collection view.

Providing an estimated item size lets the collection view defer some of the calculations needed to determine the size of its content, which can improve performance. Instead of explicitly computing the size of each item, the flow layout assumes that offscreen items have the estimated size. The estimated size is used only until an actual value is calculated. The default value of this property is zero size.

If the value of this property is not NSZeroSize, the flow layout uses the estimated size you specified. If all of your items actually have the same size, use the itemSize property to set their size and set this property to NSZeroSize.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.footerReferenceSize as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The default size to use for section footers.

The layout object uses only the value that is appropriate for the current scrolling direction. In other words, the layout object uses only the height value when the content scrolls vertically, setting the width of the footer to the width of the collection view. Similarly, the layout object uses only the width value when the content scrolls horizontally, setting the footer’s height to the height of the collection view. If the size value for the appropriate dimension is 0, the layout object omits the footer entirely.

The default value of this property is zero size.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.headerReferenceSize as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The default size to use for section headers.

The layout object uses only the value that is appropriate for the current scrolling direction. In other words, the layout object uses only the height value when the content scrolls vertically, setting the width of the header to the width of the collection view. Similarly, the layout object uses only the width value when the content scrolls horizontally, setting the header’s height to the height of the collection view. If the size value for the appropriate dimension is 0, the layout object omits the header entirely.

The default value of this property is zero size.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.itemSize as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The default size to use for items.

This property contains the default size of items.

All items are set to the same size. This value applies only to items and not to supplementary views.
The default value of this property is (50.0, 50.0).
(Read and Write property)

Some examples using this property:

NSCollectionViewFlowLayoutMBS.minimumInteritemSpacing as Double

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

The minimum spacing (in points) to use between items in the same row or column.

For a vertically scrolling layout, the value represents the minimum spacing between items in the same row. For a horizontally scrolling layout, the value represents the minimum spacing between items in the same column. The layout object uses this spacing only to compute how many items can fit in a single row or column. The actual spacing may be increased after the number of items has been determined.

The default value of this property is 10.0.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.minimumLineSpacing as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The minimum spacing (in points) to use between rows or columns.

For a vertically scrolling layout, the value represents the minimum spacing between successive rows. For a horizontally scrolling layout, the value represents the minimum spacing between successive columns. This spacing is not applied to the space between the header view and the first line or between the last line and the footer view. Figure 1 shows how the line spacing is applied to rows of unevenly sized items, illustrating how the actual spacing between individual items may be greater than the minimum value.

The default value of this property is 10.0.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.scrollDirection as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The scroll direction of the layout.

The flow layout scrolls along one axis only, either horizontally or vertically. When the scroll direction is ScrollDirectionVertical, the width of the content never exceeds the width of the collection view itself but the height grows as needed to accommodate the current items. When the scroll direction is ScrollDirectionHorizontal, the height never exceeds the height of the collection view but the width grows as needed.

The default value of this property is ScrollDirectionVertical.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.sectionFootersPinToVisibleBounds as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Set to true to get footers that pin to the bottom while scrolling.

Enabling this feature may affect the parenting of header and footer views.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.sectionHeadersPinToVisibleBounds as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Set to true to get headers that pin to the top of the visible area.

Enabling this feature may affect the parenting of header and footer views.
(Read and Write property)

NSCollectionViewFlowLayoutMBS.sectionInset as NSEdgeInsetsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The margins used to lay out content in a section.

Section insets reflect the spacing at the outer edges of the section. The margins affect the positioning of the header view, the minimum space on either side of each line of items, and the distance from the last line to the footer view. The margin insets do not affect the size of the header and footer views in the nonscrolling direction.

The default insets are all set to 0.
(Read and Write property)

Some examples using this property:

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


The biggest plugin in space...