<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableViewDropPlaceholderContext/commitInsertion(dataSourceUpdates:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITableViewDropPlaceholderContext(im)commitInsertionWithDataSourceUpdates:"
  },
  "title" : "commitInsertion(dataSourceUpdates:)"
}
-->

# commitInsertion(dataSourceUpdates:)

Exchanges the placeholder cell for a cell with the final content.

```
func commitInsertion(dataSourceUpdates: (IndexPath) -> Void) -> Bool
```

## Parameters

`dataSourceUpdates`

The handler block to execute as part of committing your changes. Use this block to update your table view’s data source with the actual data that you received. This block has no return value and takes the following parameter:

- insertionIndexPath: The location at which to insert any items into your data source. Always use this index path for the insertion point instead of any cached values.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the placeholder was replaced by your content or <doc://com.apple.documentation/documentation/Swift/false> if the placeholder was no longer in the table view.

## Discussion

When you receive the actual data for a cell, call this method on your app’s main thread to remove the corresponding placeholder cell and insert the actual cell. If the placeholder cell is still present in the table view, this method calls the `dataSourceUpdates` handler. Use that block only to update the data source object of your table view. Don’t update the table view itself, and don’t call [`reloadData()`](/documentation/UIKit/UITableView/reloadData()) on the table view. When your block finishes, the table view updates itself automatically, creating a new cell for your data.

If the placeholder cell is no longer present, this method doesn’t execute your `dataSourceUpdates` block.

---

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)