<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDataSourceTranslating",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIDataSourceTranslating"
  },
  "title" : "UIDataSourceTranslating"
}
-->

# UIDataSourceTranslating

An advanced interface for managing a data source object.

```
@MainActor protocol UIDataSourceTranslating : NSObjectProtocol
```

## Overview

Use the methods of this protocol to map between the positions of items and sections in your data source object and the positions of those same items and sections in your presented layout. Objects that adopt this protocol do so because the position of items in their data source object don’t always match the corresponding positions in their presented layout.

[`UITableView`](/documentation/UIKit/UITableView) and [`UICollectionView`](/documentation/UIKit/UICollectionView) adopt this protocol and use it in conjunction with drag and drop operations. For example, [`UITableView`](/documentation/UIKit/UITableView) must account for the presence of placeholder cells, which appear as rows in the table but don’t have a corresponding entry in the data source object. Typically, you don’t adopt this protocol in your own classes.

## Topics

### Managing item positions

[`func presentationIndexPath(forDataSourceIndexPath: IndexPath?) -> IndexPath?`](/documentation/UIKit/UIDataSourceTranslating/presentationIndexPath(forDataSourceIndexPath:))

Translates an index in your data source object to the equivalent index in your presented layout.

[`func dataSourceIndexPath(forPresentationIndexPath: IndexPath?) -> IndexPath?`](/documentation/UIKit/UIDataSourceTranslating/dataSourceIndexPath(forPresentationIndexPath:))

Translates an index in your presented layout to the equivalent index in your data source object.

### Managing section positions

[`func presentationSectionIndex(forDataSourceSectionIndex: Int) -> Int`](/documentation/UIKit/UIDataSourceTranslating/presentationSectionIndex(forDataSourceSectionIndex:))

Translates a section index in your data source object to the equivalent section index in your presented layout.

[`func dataSourceSectionIndex(forPresentationSectionIndex: Int) -> Int`](/documentation/UIKit/UIDataSourceTranslating/dataSourceSectionIndex(forPresentationSectionIndex:))

Translates a section index in your presented layout to the equivalent section index in your data source object.

### Performing actions

[`func performUsingPresentationValues(() -> Void)`](/documentation/UIKit/UIDataSourceTranslating/performUsingPresentationValues(_:))

Performs actions on the current object using index paths that are relative to the presentation layer of that object.

## Relationships

### Conforming Types

[`UITableView`](/documentation/UIKit/UITableView)

[`UICollectionView`](/documentation/UIKit/UICollectionView)

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)