Package apple.uikit

Class UICollectionViewLayout

    • Constructor Detail

      • UICollectionViewLayout

        protected UICollectionViewLayout​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static UICollectionViewLayout allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • invalidationContextClass

        @NotNull
        public static @NotNull org.moe.natj.objc.Class invalidationContextClass()
        override this method to provide a custom class to be used for invalidation contexts API-Since: 7.0
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • layoutAttributesClass

        @NotNull
        public static @NotNull org.moe.natj.objc.Class layoutAttributesClass()
        override this method to provide a custom class to be used when instantiating instances of UICollectionViewLayoutAttributes
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • collectionView

        @Nullable
        public @Nullable UICollectionView collectionView()
        Methods in this class are meant to be overridden and will be called by its collection view to gather layout information. To get the truth on the current state of the collection view, call methods on UICollectionView rather than these.
      • collectionViewContentSize

        public CGSize collectionViewContentSize()
        Subclasses must override this method and use it to return the width and height of the collection view’s content. These values represent the width and height of all the content, not just the content that is currently visible. The collection view uses this information to configure its own content size to facilitate scrolling.
      • finalLayoutAttributesForDisappearingDecorationElementOfKindAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes finalLayoutAttributesForDisappearingDecorationElementOfKindAtIndexPath​(@NotNull
                                                                                                                                 @NotNull java.lang.String elementKind,
                                                                                                                                 @NotNull
                                                                                                                                 @NotNull NSIndexPath decorationIndexPath)
      • finalLayoutAttributesForDisappearingItemAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes finalLayoutAttributesForDisappearingItemAtIndexPath​(@NotNull
                                                                                                              @NotNull NSIndexPath itemIndexPath)
      • finalLayoutAttributesForDisappearingSupplementaryElementOfKindAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes finalLayoutAttributesForDisappearingSupplementaryElementOfKindAtIndexPath​(@NotNull
                                                                                                                                    @NotNull java.lang.String elementKind,
                                                                                                                                    @NotNull
                                                                                                                                    @NotNull NSIndexPath elementIndexPath)
      • finalizeAnimatedBoundsChange

        public void finalizeAnimatedBoundsChange()
        also called inside the animation block
      • finalizeCollectionViewUpdates

        public void finalizeCollectionViewUpdates()
        called inside an animation block after the update
      • finalizeLayoutTransition

        public void finalizeLayoutTransition()
        called inside an animation block after the transition API-Since: 7.0
      • indexPathsToDeleteForDecorationViewOfKind

        @NotNull
        public @NotNull NSArray<? extends NSIndexPath> indexPathsToDeleteForDecorationViewOfKind​(@NotNull
                                                                                                 @NotNull java.lang.String elementKind)
        API-Since: 7.0
      • indexPathsToDeleteForSupplementaryViewOfKind

        @NotNull
        public @NotNull NSArray<? extends NSIndexPath> indexPathsToDeleteForSupplementaryViewOfKind​(@NotNull
                                                                                                    @NotNull java.lang.String elementKind)
        These methods are called by collection view during an update block. Return an array of index paths to indicate views that the layout is deleting or inserting in response to the update. API-Since: 7.0
      • indexPathsToInsertForDecorationViewOfKind

        @NotNull
        public @NotNull NSArray<? extends NSIndexPath> indexPathsToInsertForDecorationViewOfKind​(@NotNull
                                                                                                 @NotNull java.lang.String elementKind)
        API-Since: 7.0
      • indexPathsToInsertForSupplementaryViewOfKind

        @NotNull
        public @NotNull NSArray<? extends NSIndexPath> indexPathsToInsertForSupplementaryViewOfKind​(@NotNull
                                                                                                    @NotNull java.lang.String elementKind)
        API-Since: 7.0
      • initialLayoutAttributesForAppearingDecorationElementOfKindAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes initialLayoutAttributesForAppearingDecorationElementOfKindAtIndexPath​(@NotNull
                                                                                                                                @NotNull java.lang.String elementKind,
                                                                                                                                @NotNull
                                                                                                                                @NotNull NSIndexPath decorationIndexPath)
      • initialLayoutAttributesForAppearingItemAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes initialLayoutAttributesForAppearingItemAtIndexPath​(@NotNull
                                                                                                             @NotNull NSIndexPath itemIndexPath)
        This set of methods is called when the collection view undergoes an animated transition such as a batch update block or an animated bounds change. For each element on screen before the invalidation, finalLayoutAttributesForDisappearingXXX will be called and an animation setup from what is on screen to those final attributes. For each element on screen after the invalidation, initialLayoutAttributesForAppearingXXX will be called and an animation setup from those initial attributes to what ends up on screen.
      • initialLayoutAttributesForAppearingSupplementaryElementOfKindAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes initialLayoutAttributesForAppearingSupplementaryElementOfKindAtIndexPath​(@NotNull
                                                                                                                                   @NotNull java.lang.String elementKind,
                                                                                                                                   @NotNull
                                                                                                                                   @NotNull NSIndexPath elementIndexPath)
      • invalidateLayout

        public void invalidateLayout()
        Call -invalidateLayout to indicate that the collection view needs to requery the layout information. Subclasses must always call super if they override.
      • invalidationContextForEndingInteractiveMovementOfItemsToFinalIndexPathsPreviousIndexPathsMovementCancelled

        @NotNull
        public @NotNull UICollectionViewLayoutInvalidationContext invalidationContextForEndingInteractiveMovementOfItemsToFinalIndexPathsPreviousIndexPathsMovementCancelled​(@NotNull
                                                                                                                                                                             @NotNull NSArray<? extends NSIndexPath> indexPaths,
                                                                                                                                                                             @NotNull
                                                                                                                                                                             @NotNull NSArray<? extends NSIndexPath> previousIndexPaths,
                                                                                                                                                                             boolean movementCancelled)
        API-Since: 9.0
      • invalidationContextForInteractivelyMovingItemsWithTargetPositionPreviousIndexPathsPreviousPosition

        @NotNull
        public @NotNull UICollectionViewLayoutInvalidationContext invalidationContextForInteractivelyMovingItemsWithTargetPositionPreviousIndexPathsPreviousPosition​(@NotNull
                                                                                                                                                                     @NotNull NSArray<? extends NSIndexPath> targetIndexPaths,
                                                                                                                                                                     CGPoint targetPosition,
                                                                                                                                                                     @NotNull
                                                                                                                                                                     @NotNull NSArray<? extends NSIndexPath> previousIndexPaths,
                                                                                                                                                                     CGPoint previousPosition)
        API-Since: 9.0
      • layoutAttributesForDecorationViewOfKindAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes layoutAttributesForDecorationViewOfKindAtIndexPath​(@NotNull
                                                                                                             @NotNull java.lang.String elementKind,
                                                                                                             @NotNull
                                                                                                             @NotNull NSIndexPath indexPath)
      • layoutAttributesForElementsInRect

        @Nullable
        public @Nullable NSArray<? extends UICollectionViewLayoutAttributes> layoutAttributesForElementsInRect​(CGRect rect)
        return an array layout attributes instances for all the views in the given rect
      • layoutAttributesForInteractivelyMovingItemAtIndexPathWithTargetPosition

        @NotNull
        public @NotNull UICollectionViewLayoutAttributes layoutAttributesForInteractivelyMovingItemAtIndexPathWithTargetPosition​(@NotNull
                                                                                                                                 @NotNull NSIndexPath indexPath,
                                                                                                                                 CGPoint position)
        API-Since: 9.0
      • layoutAttributesForSupplementaryViewOfKindAtIndexPath

        @Nullable
        public @Nullable UICollectionViewLayoutAttributes layoutAttributesForSupplementaryViewOfKindAtIndexPath​(@NotNull
                                                                                                                @NotNull java.lang.String elementKind,
                                                                                                                @NotNull
                                                                                                                @NotNull NSIndexPath indexPath)
      • prepareForAnimatedBoundsChange

        public void prepareForAnimatedBoundsChange​(CGRect oldBounds)
        UICollectionView calls this when its bounds have changed inside an animation block before displaying cells in its new bounds
      • prepareForCollectionViewUpdates

        public void prepareForCollectionViewUpdates​(@NotNull
                                                    @NotNull NSArray<? extends UICollectionViewUpdateItem> updateItems)
        This method is called when there is an update with deletes/inserts to the collection view. It will be called prior to calling the initial/final layout attribute methods below to give the layout an opportunity to do batch computations for the insertion and deletion layout attributes. The updateItems parameter is an array of UICollectionViewUpdateItem instances for each element that is moving to a new index path.
      • prepareForTransitionFromLayout

        public void prepareForTransitionFromLayout​(@NotNull
                                                   @NotNull UICollectionViewLayout oldLayout)
        API-Since: 7.0
      • prepareForTransitionToLayout

        public void prepareForTransitionToLayout​(@NotNull
                                                 @NotNull UICollectionViewLayout newLayout)
        UICollectionView calls this when prior the layout transition animation on the incoming and outgoing layout API-Since: 7.0
      • prepareLayout

        public void prepareLayout()
        The collection view calls -prepareLayout once at its first layout as the first message to the layout instance. The collection view calls -prepareLayout again after layout is invalidated and before requerying the layout information. Subclasses should always call super if they override.
      • registerClassForDecorationViewOfKind

        public void registerClassForDecorationViewOfKind​(@Nullable
                                                         @Nullable org.moe.natj.objc.Class viewClass,
                                                         @NotNull
                                                         @NotNull java.lang.String elementKind)
      • registerNibForDecorationViewOfKind

        public void registerNibForDecorationViewOfKind​(@Nullable
                                                       @Nullable UINib nib,
                                                       @NotNull
                                                       @NotNull java.lang.String elementKind)
      • shouldInvalidateLayoutForBoundsChange

        public boolean shouldInvalidateLayoutForBoundsChange​(CGRect newBounds)
        return YES to cause the collection view to requery the layout for geometry information
      • shouldInvalidateLayoutForPreferredLayoutAttributesWithOriginalAttributes

        public boolean shouldInvalidateLayoutForPreferredLayoutAttributesWithOriginalAttributes​(@NotNull
                                                                                                @NotNull UICollectionViewLayoutAttributes preferredAttributes,
                                                                                                @NotNull
                                                                                                @NotNull UICollectionViewLayoutAttributes originalAttributes)
        API-Since: 8.0
      • targetContentOffsetForProposedContentOffset

        public CGPoint targetContentOffsetForProposedContentOffset​(CGPoint proposedContentOffset)
        a layout can return the content offset to be applied during transition or update animations API-Since: 7.0
      • targetContentOffsetForProposedContentOffsetWithScrollingVelocity

        public CGPoint targetContentOffsetForProposedContentOffsetWithScrollingVelocity​(CGPoint proposedContentOffset,
                                                                                        CGPoint velocity)
        return a point at which to rest after scrolling - for layouts that want snap-to-point scrolling behavior
      • targetIndexPathForInteractivelyMovingItemWithPosition

        @NotNull
        public @NotNull NSIndexPath targetIndexPathForInteractivelyMovingItemWithPosition​(@NotNull
                                                                                          @NotNull NSIndexPath previousIndexPath,
                                                                                          CGPoint position)
        API-Since: 9.0
      • developmentLayoutDirection

        public long developmentLayoutDirection()
        Default implementation returns the layout direction of the main bundle's development region; FlowLayout returns leftToRight. Subclasses may override this to specify the implementation-time layout direction of the layout.
      • flipsHorizontallyInOppositeLayoutDirection

        public boolean flipsHorizontallyInOppositeLayoutDirection()
        Base implementation returns false. If your subclass’s implementation overrides this property to return true, a UICollectionView showing this layout will ensure its bounds.origin is always found at the leading edge, flipping its coordinate system horizontally if necessary.
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.