<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewLayout/layoutAttributesClass",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionViewLayout(cpy)layoutAttributesClass"
  },
  "title" : "layoutAttributesClass"
}
-->

# layoutAttributesClass

Returns the class to use for layout attribute objects

```
class var layoutAttributesClass: AnyClass { get }
```

## Return Value

The class to use for layout attribute objects.

## Discussion

Override this method if you define a custom [`NSCollectionViewLayoutAttributes`](/documentation/AppKit/NSCollectionViewLayoutAttributes) subclass for managing layout-related attributes. In your implementation, return the class object for your custom subclass.

You can call this method as needed to create new layout objects. A typical usage of this method is as follows:

```objc
id attributes = [[[MyCustomLayout layoutAttributesClass] alloc] init];
```

---

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)