<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionReusableView/apply(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionReusableView(im)applyLayoutAttributes:"
  },
  "title" : "apply(_:)"
}
-->

# apply(_:)

Applies the specified layout attributes to the view.

```
func apply(_ layoutAttributes: UICollectionViewLayoutAttributes)
```

## Parameters

`layoutAttributes`

The layout attributes to apply.

## Discussion

The default implementation of this method does nothing.

If the layout object supports custom layout attributes, you can use this method to apply those attributes to the view. In such a case, the `layoutAttributes` parameter should contain an instance of a subclass of [`UICollectionViewLayoutAttributes`](/documentation/UIKit/UICollectionViewLayoutAttributes). You do not need to override this method to support the standard layout attributes of the [`UICollectionViewLayoutAttributes`](/documentation/UIKit/UICollectionViewLayoutAttributes) class. The collection view applies those attributes automatically.

---

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)