UIDataSourceTranslating
An advanced interface for managing a data source object.
Declaration
@MainActor protocol UIDataSourceTranslating : NSObjectProtocolOverview
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 and UICollectionView adopt this protocol and use it in conjunction with drag and drop operations. For example, 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
Managing section positions
presentationSectionIndex(forDataSourceSectionIndex:)dataSourceSectionIndex(forPresentationSectionIndex:)