Package apple.uikit.protocol
Interface UICollectionViewDataSource
-
- All Known Implementing Classes:
UICollectionViewController,UICollectionViewDiffableDataSource
public interface UICollectionViewDataSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancollectionViewCanMoveItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)UICollectionViewCellcollectionViewCellForItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath:default NSIndexPathcollectionViewIndexPathForIndexTitleAtIndex(UICollectionView collectionView, java.lang.String title, long index)Returns the index path that corresponds to the given title / index.default voidcollectionViewMoveItemAtIndexPathToIndexPath(UICollectionView collectionView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)longcollectionViewNumberOfItemsInSection(UICollectionView collectionView, long section)default UICollectionReusableViewcollectionViewViewForSupplementaryElementOfKindAtIndexPath(UICollectionView collectionView, java.lang.String kind, NSIndexPath indexPath)The view that is returned must be retrieved from a call to -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:default NSArray<java.lang.String>indexTitlesForCollectionView(UICollectionView collectionView)Returns a list of index titles to display in the index view (e.g.default longnumberOfSectionsInCollectionView(UICollectionView collectionView)
-
-
-
Method Detail
-
collectionViewCanMoveItemAtIndexPath
default boolean collectionViewCanMoveItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
-
collectionViewCellForItemAtIndexPath
UICollectionViewCell collectionViewCellForItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath:
-
collectionViewMoveItemAtIndexPathToIndexPath
default void collectionViewMoveItemAtIndexPathToIndexPath(UICollectionView collectionView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)
-
collectionViewNumberOfItemsInSection
long collectionViewNumberOfItemsInSection(UICollectionView collectionView, long section)
-
collectionViewViewForSupplementaryElementOfKindAtIndexPath
default UICollectionReusableView collectionViewViewForSupplementaryElementOfKindAtIndexPath(UICollectionView collectionView, java.lang.String kind, NSIndexPath indexPath)
The view that is returned must be retrieved from a call to -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:
-
numberOfSectionsInCollectionView
default long numberOfSectionsInCollectionView(UICollectionView collectionView)
-
collectionViewIndexPathForIndexTitleAtIndex
default NSIndexPath collectionViewIndexPathForIndexTitleAtIndex(UICollectionView collectionView, java.lang.String title, long index)
Returns the index path that corresponds to the given title / index. (e.g. "B",1) Return an index path with a single index to indicate an entire section, instead of a specific item.
-
indexTitlesForCollectionView
default NSArray<java.lang.String> indexTitlesForCollectionView(UICollectionView collectionView)
Returns a list of index titles to display in the index view (e.g. ["A", "B", "C" ... "Z", "#"])
-
-