<!--
{
  "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/UITableViewDataSource/tableView(_:canMoveRowAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITableViewDataSource(im)tableView:canMoveRowAtIndexPath:"
  },
  "title" : "tableView(_:canMoveRowAt:)"
}
-->

# tableView(_:canMoveRowAt:)

Asks the data source whether a given row can move to another location in the table view.

```
optional func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool
```

## Parameters

`tableView`

The table-view object requesting this information.

`indexPath`

An index path locating a row in `tableView`.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the row can be moved; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

This method allows the data source to specify that the reordering control for the specified row not be shown. By default, the reordering control is shown if the data source implements the [`tableView(_:moveRowAt:to:)`](/documentation/UIKit/UITableViewDataSource/tableView(_:moveRowAt:to:)) method.

---

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)