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(@NotNull UICollectionView collectionView, @NotNull NSIndexPath indexPath)API-Since: 9.0@NotNull UICollectionViewCellcollectionViewCellForItemAtIndexPath(@NotNull UICollectionView collectionView, @NotNull NSIndexPath indexPath)The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath:default @NotNull NSIndexPathcollectionViewIndexPathForIndexTitleAtIndex(@NotNull UICollectionView collectionView, @NotNull java.lang.String title, long index)Returns the index path that corresponds to the given title / index.default voidcollectionViewMoveItemAtIndexPathToIndexPath(@NotNull UICollectionView collectionView, @NotNull NSIndexPath sourceIndexPath, @NotNull NSIndexPath destinationIndexPath)API-Since: 9.0longcollectionViewNumberOfItemsInSection(@NotNull UICollectionView collectionView, long section)default @NotNull UICollectionReusableViewcollectionViewViewForSupplementaryElementOfKindAtIndexPath(@NotNull UICollectionView collectionView, @NotNull java.lang.String kind, @NotNull NSIndexPath indexPath)The view that is returned must be retrieved from a call to -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:default @Nullable NSArray<java.lang.String>indexTitlesForCollectionView(@NotNull UICollectionView collectionView)Returns a list of index titles to display in the index view (e.g.default longnumberOfSectionsInCollectionView(@NotNull UICollectionView collectionView)
-
-
-
Method Detail
-
collectionViewCanMoveItemAtIndexPath
default boolean collectionViewCanMoveItemAtIndexPath(@NotNull @NotNull UICollectionView collectionView, @NotNull @NotNull NSIndexPath indexPath)API-Since: 9.0
-
collectionViewCellForItemAtIndexPath
@NotNull @NotNull UICollectionViewCell collectionViewCellForItemAtIndexPath(@NotNull @NotNull UICollectionView collectionView, @NotNull @NotNull NSIndexPath indexPath)
The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath:
-
collectionViewMoveItemAtIndexPathToIndexPath
default void collectionViewMoveItemAtIndexPathToIndexPath(@NotNull @NotNull UICollectionView collectionView, @NotNull @NotNull NSIndexPath sourceIndexPath, @NotNull @NotNull NSIndexPath destinationIndexPath)API-Since: 9.0
-
collectionViewNumberOfItemsInSection
long collectionViewNumberOfItemsInSection(@NotNull @NotNull UICollectionView collectionView, long section)
-
collectionViewViewForSupplementaryElementOfKindAtIndexPath
@NotNull default @NotNull UICollectionReusableView collectionViewViewForSupplementaryElementOfKindAtIndexPath(@NotNull @NotNull UICollectionView collectionView, @NotNull @NotNull java.lang.String kind, @NotNull @NotNull NSIndexPath indexPath)
The view that is returned must be retrieved from a call to -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:
-
numberOfSectionsInCollectionView
default long numberOfSectionsInCollectionView(@NotNull @NotNull UICollectionView collectionView)
-
collectionViewIndexPathForIndexTitleAtIndex
@NotNull default @NotNull NSIndexPath collectionViewIndexPathForIndexTitleAtIndex(@NotNull @NotNull UICollectionView collectionView, @NotNull @NotNull 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. API-Since: 14.0
-
indexTitlesForCollectionView
@Nullable default @Nullable NSArray<java.lang.String> indexTitlesForCollectionView(@NotNull @NotNull UICollectionView collectionView)
Returns a list of index titles to display in the index view (e.g. ["A", "B", "C" ... "Z", "#"]) API-Since: 14.0
-
-