---
title: maximumNumberOfRows
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscollectionviewgridlayout/maximumnumberofrows
---

# maximumNumberOfRows

The maximum number of rows to display in the collection view’s visible area.

## Declaration

```swift
var maximumNumberOfRows: Int { get set }
```

## Discussion

Discussion Use this value to specify the maximum number of rows to display in the collection view at any given time. The grid layout object uses this value during layout to configure the position and spacing of items. The default value of this property is 0, which means that there is no maximum number of rows.

## See Also

### Specifying the Grid Parameters

- [maximumNumberOfColumns](appkit/nscollectionviewgridlayout/maximumnumberofcolumns.md)
- [minimumItemSize](appkit/nscollectionviewgridlayout/minimumitemsize.md)
- [maximumItemSize](appkit/nscollectionviewgridlayout/maximumitemsize.md)
