<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSCollectionLayoutSize",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionLayoutSize"
  },
  "title" : "NSCollectionLayoutSize"
}
-->

# NSCollectionLayoutSize

The width and the height of an item in a collection view.

```
@MainActor class NSCollectionLayoutSize
```

## Overview

A size is a pair of dimensions ([`NSCollectionLayoutDimension`](/documentation/UIKit/NSCollectionLayoutDimension)): a width dimension and a height dimension. Every component of a collection view layout has an explicit size.

## Topics

### Creating a layout size

[`init(widthDimension:heightDimension:)`](/documentation/UIKit/NSCollectionLayoutSize/init(widthDimension:heightDimension:))

Creates a size with the specified width and height dimensions.

### Getting the width and height

[`widthDimension`](/documentation/UIKit/NSCollectionLayoutSize/widthDimension)

The width dimension of an item in a collection view layout.

[`heightDimension`](/documentation/UIKit/NSCollectionLayoutSize/heightDimension)

The height dimension of an item in a collection view layout.



---

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)