<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableView/deleteRows(at:with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITableView(im)deleteRowsAtIndexPaths:withRowAnimation:"
  },
  "title" : "deleteRows(at:with:)"
}
-->

# deleteRows(at:with:)

Deletes the rows that an array of index paths identifies, with an option to animate the deletion.

```
func deleteRows(at indexPaths: [IndexPath], with animation: UITableView.RowAnimation)
```

## Parameters

`indexPaths`

An array of <doc://com.apple.documentation/documentation/Foundation/NSIndexPath> objects identifying the rows to delete.

`animation`

A constant that indicates how the deletion is to be animated, for example, fade out or slide out from the bottom. See [`UITableView.RowAnimation`](/documentation/UIKit/UITableView/RowAnimation) for descriptions of these constants.

## Discussion

When this method is called in an animation block defined by the [`beginUpdates()`](/documentation/UIKit/UITableView/beginUpdates()) and [`endUpdates()`](/documentation/UIKit/UITableView/endUpdates()) methods, `UITableView` defers any insertions of rows or sections until after it has handled the deletions of rows or sections. This order is followed regardless how the insertion and deletion method calls are ordered. This is unlike inserting or removing an item in a mutable array, in which the operation can affect the array index used for the successive insertion or removal operation. For more on this subject, see [Batch Insertion, Deletion, and Reloading of Rows and Sections](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/TableView_iPhone/ManageInsertDeleteRow/ManageInsertDeleteRow.html#//apple_ref/doc/uid/TP40007451-CH10-SW9) in [Table View Programming Guide for iOS](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html#//apple_ref/doc/uid/TP40007451).

## See Also

[`reloadRows(at:with:)`](/documentation/UIKit/UITableView/reloadRows(at:with:))

Reloads the specified rows using the provided animation effect.



---

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)