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

# prepareForReuse()

Performs any clean up necessary to prepare the view for use again.

```
func prepareForReuse()
```

## Discussion

The default implementation of this method does nothing. Subclasses such as [`UICollectionViewCell`](/documentation/UIKit/UICollectionViewCell) override this method and use it to perform relevant actions. So, if your subclass descends from [`UICollectionViewCell`](/documentation/UIKit/UICollectionViewCell) or another intermediate class, call `super` to ensure that your class gets the parent’s behavior.

When the collection view dequeues your view for use, it calls this method before the corresponding dequeue method returns the view to your code. Override this method in your subclass to reset properties to their default values and make the view ready to use again. Don’t use this method to assign any new data to the view; that’s the responsibility of your data source object.

The collection view doesn’t call this method when you use [`reconfigureItems(at:)`](/documentation/UIKit/UICollectionView/reconfigureItems(at:)) on `UICollectionView`, or [`reconfigureItems(_:)`](/documentation/UIKit/NSDiffableDataSourceSnapshot-swift.struct/reconfigureItems(_:)) (Swift) or [`reconfigureItems(withIdentifiers:)`](/documentation/UIKit/NSDiffableDataSourceSnapshotReference/reconfigureItems(withIdentifiers:)) (Objective-C) on `NSDiffableDataSourceSnapshot` to update the contents of an existing cell.

---

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)