Package apple.uikit.protocol
Interface UIDataSourceTranslating
-
- All Known Implementing Classes:
UICollectionView,UITableView
public interface UIDataSourceTranslatingFor advanced clients with data model centric layouts (i.e. the layout refers to the data source to gather information in order to create UICollectionViewLayoutAttributes) this protocol allows translation between the data source index path into the presentation index path (i.e. layout) state.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUIDataSourceTranslating.Block_performUsingPresentationValues
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NSIndexPathdataSourceIndexPathForPresentationIndexPath(NSIndexPath presentationIndexPath)Translate (if needed) a Presentation index path to the Data Source index path.longdataSourceSectionIndexForPresentationSectionIndex(long presentationSectionIndex)Translate (if needed) a Presentation section index to its Data Source section index value.voidperformUsingPresentationValues(UIDataSourceTranslating.Block_performUsingPresentationValues actionsToTranslate)Arguments passed to actions performed inside the scope of this block will be interpreted as values in the presentation state, and the values returned from these actions will also be in the presentation state.NSIndexPathpresentationIndexPathForDataSourceIndexPath(NSIndexPath dataSourceIndexPath)Translate (if needed) a Data Source index path to the Presentation index path.longpresentationSectionIndexForDataSourceSectionIndex(long dataSourceSectionIndex)Translate (if needed) a Data Source section index to its Presentation section index value.
-
-
-
Method Detail
-
dataSourceIndexPathForPresentationIndexPath
NSIndexPath dataSourceIndexPathForPresentationIndexPath(NSIndexPath presentationIndexPath)
Translate (if needed) a Presentation index path to the Data Source index path. If the item was inserted at the index path, this will return nil. If no effective change took place, will return passed value.
-
dataSourceSectionIndexForPresentationSectionIndex
long dataSourceSectionIndexForPresentationSectionIndex(long presentationSectionIndex)
Translate (if needed) a Presentation section index to its Data Source section index value. If section was inserted and not known the Data Source, this will return NSNotFound. If no effective change took place, will return passed value.
-
performUsingPresentationValues
void performUsingPresentationValues(UIDataSourceTranslating.Block_performUsingPresentationValues actionsToTranslate)
Arguments passed to actions performed inside the scope of this block will be interpreted as values in the presentation state, and the values returned from these actions will also be in the presentation state.
-
presentationIndexPathForDataSourceIndexPath
NSIndexPath presentationIndexPathForDataSourceIndexPath(NSIndexPath dataSourceIndexPath)
Translate (if needed) a Data Source index path to the Presentation index path. If the item was deleted at the index path, this will return nil. If no effective change took place, will return passed value.
-
presentationSectionIndexForDataSourceSectionIndex
long presentationSectionIndexForDataSourceSectionIndex(long dataSourceSectionIndex)
Translate (if needed) a Data Source section index to its Presentation section index value. If section was deleted during a transaction, this will return NSNotFound. If no effective change took place, will return passed value.
-
-