---
title: "vertical(layoutSize:subitem:count:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/nscollectionlayoutgroup/vertical(layoutsize:subitem:count:)"
---

# vertical(layoutSize:subitem:count:)

Creates a group of the specified size, containing an array of equally sized items arranged in a vertical line up to the number specified by count.

## Declaration

```swift
class func vertical(layoutSize: NSCollectionLayoutSize, subitem: NSCollectionLayoutItem, count: Int) -> Self
```

## Discussion

Discussion When you set a value for the interItemSpacing property after using this initializer, the group keeps the same number of items and automatically resizes them to add the extra specified spacing between them.

## See Also

### Deprecated

- [horizontal(layoutSize:subitem:count:)](uikit/nscollectionlayoutgroup/horizontal(layoutsize:subitem:count:).md)
- [horizontalGroup(with:repeatingSubitem:count:)](uikit/nscollectionlayoutgroup/horizontalgroup(with:repeatingsubitem:count:).md)
- [verticalGroup(with:repeatingSubitem:count:)](uikit/nscollectionlayoutgroup/verticalgroup(with:repeatingsubitem:count:).md)
