<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableViewDataSourcePrefetching/tableView(_:cancelPrefetchingForRowsAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITableViewDataSourcePrefetching(im)tableView:cancelPrefetchingForRowsAtIndexPaths:"
  },
  "title" : "tableView(_:cancelPrefetchingForRowsAt:)"
}
-->

# tableView(_:cancelPrefetchingForRowsAt:)

Cancels a previously triggered data prefetch request.

```
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

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:)`](/documentation/UIKit/UITableViewDataSourcePrefetching/tableView(_:prefetchRowsAt:)).

For information about how to cancel an asynchronous data loading task, see [Concurrency Programming Guide](https://developer.apple.com/library/archive/documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008091).

---

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)