Interface UICollectionViewDataSource

    • 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