---
title: isPrefetchingEnabled
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionview/isprefetchingenabled
---

# isPrefetchingEnabled

A Boolean value that indicates whether cell and data prefetching are enabled.

## Declaration

```swift
var isPrefetchingEnabled: Bool { get set }
```

## Discussion

Discussion When true, the collection view requests cells in advance of when they will be displayed, spreading the rendering over multiple layout passes. When false, the cells are requested as they are needed for display, often with multiple cells being requested in the same render loop. Setting this property to false also disables data prefetching. The default value of this property is true. note: When prefetching is enabled the collectionView(_:cellForItemAt:) method on the collection view delegate is called in advance of when the cell is required. To avoid inconsistencies in the visual appearance, use the collectionView(_:willDisplay:forItemAt:) delegate method to update the cell to reflect visual state such as selection.

## See Also

### Prefetching collection view cells and data

- [prefetchDataSource](uikit/uicollectionview/prefetchdatasource.md)
- [UICollectionViewDataSourcePrefetching](uikit/uicollectionviewdatasourceprefetching.md)
