<!--
{
  "availability" : [
    "iOS: 16.0.0 - 16.0.0",
    "iPadOS: 16.0.0 - 16.0.0",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSCollectionLayoutGroup/horizontalGroup(with:repeatingSubitem:count:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So23NSCollectionLayoutGroupC5UIKitE010horizontalC04with16repeatingSubitem5countABSo0aB4SizeC_So0aB4ItemCSitFZ"
  },
  "title" : "horizontalGroup(with:repeatingSubitem:count:)"
}
-->

# horizontalGroup(with:repeatingSubitem:count:)

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

```
@MainActor @preconcurrency class func horizontalGroup(with size: NSCollectionLayoutSize, repeatingSubitem subitem: NSCollectionLayoutItem, count: Int) -> NSCollectionLayoutGroup
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)