<!--
{
  "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/UICollectionView/layoutAttributesForItem(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionView(im)layoutAttributesForItemAtIndexPath:"
  },
  "title" : "layoutAttributesForItem(at:)"
}
-->

# layoutAttributesForItem(at:)

Gets the layout information for the item at the specified index path.

```
func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes?
```

## Parameters

`indexPath`

The index path of the item.

## Return Value

The layout attributes for the item or `nil` if no item exists at the specified path.

## Discussion

Use this method to retrieve the layout information for a particular item. You should always use this method instead of querying the layout object directly.

---

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)