---
title: "tableView(_:cancelPrefetchingForRowsAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdatasourceprefetching/tableview(_:cancelprefetchingforrowsat:)"
---

# tableView(_:cancelPrefetchingForRowsAt:)

Cancels a previously triggered data prefetch request.

## Declaration

```swift
optional func tableView(_ tableView: UITableView, cancelPrefetchingForRowsAt indexPaths: [IndexPath])
```

## Parameters

- `tableView`: The table view issuing the cancellation of the prefetch request.
- `indexPaths`: The index paths of the items for which the data is no longer required.

## Discussion

Discussion The table view calls this method on the main queue to cancel prefetch requests for cells that are no longer needed. Use this method to cancel operations initiated by a previous call to tableView(_:prefetchRowsAt:). For information about how to cancel an asynchronous data loading task, see Concurrency Programming Guide.

## See Also

### Fetching the row data

- [tableView(_:prefetchRowsAt:)](uikit/uitableviewdatasourceprefetching/tableview(_:prefetchrowsat:).md)
