---
title: "horizontal(layoutSize:repeatingSubitem:count:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/nscollectionlayoutgroup/horizontal(layoutsize:repeatingsubitem:count:)"
---

# horizontal(layoutSize:repeatingSubitem:count:)

Creates a group that repeats the specified subitem a certain number of times along the horizontal axis.

## Declaration

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

## Parameters

- `layoutSize`: The group’s size.
- `subitem`: The subitem to repeat. It’s your responsibility to ensure that the group’s layoutSize can fit count repetitions of this item.
- `count`: The number of times to repeat the subitem.

## See Also

### Creating a horizontal group

- [horizontal(layoutSize:subitems:)](uikit/nscollectionlayoutgroup/horizontal(layoutsize:subitems:).md)
