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 java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

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

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

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

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

        public static 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

        public static org.moe.natj.objc.Class invalidationContextClass()
        override this method to provide a custom class to be used for invalidation contexts
      • isSubclassOfClass

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

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

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

        public static java.lang.Object new_objc()
      • 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

        public 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

        public UICollectionViewLayoutAttributes finalLayoutAttributesForDisappearingDecorationElementOfKindAtIndexPath​(java.lang.String elementKind,
                                                                                                                       NSIndexPath decorationIndexPath)
      • finalLayoutAttributesForDisappearingSupplementaryElementOfKindAtIndexPath

        public UICollectionViewLayoutAttributes finalLayoutAttributesForDisappearingSupplementaryElementOfKindAtIndexPath​(java.lang.String elementKind,
                                                                                                                          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
      • indexPathsToDeleteForDecorationViewOfKind

        public NSArray<? extends NSIndexPath> indexPathsToDeleteForDecorationViewOfKind​(java.lang.String elementKind)
      • indexPathsToDeleteForSupplementaryViewOfKind

        public NSArray<? extends NSIndexPath> indexPathsToDeleteForSupplementaryViewOfKind​(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.
      • indexPathsToInsertForDecorationViewOfKind

        public NSArray<? extends NSIndexPath> indexPathsToInsertForDecorationViewOfKind​(java.lang.String elementKind)
      • indexPathsToInsertForSupplementaryViewOfKind

        public NSArray<? extends NSIndexPath> indexPathsToInsertForSupplementaryViewOfKind​(java.lang.String elementKind)
      • initialLayoutAttributesForAppearingDecorationElementOfKindAtIndexPath

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

        public UICollectionViewLayoutAttributes initialLayoutAttributesForAppearingItemAtIndexPath​(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

        public UICollectionViewLayoutAttributes initialLayoutAttributesForAppearingSupplementaryElementOfKindAtIndexPath​(java.lang.String elementKind,
                                                                                                                         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

        public UICollectionViewLayoutInvalidationContext invalidationContextForEndingInteractiveMovementOfItemsToFinalIndexPathsPreviousIndexPathsMovementCancelled​(NSArray<? extends NSIndexPath> indexPaths,
                                                                                                                                                                    NSArray<? extends NSIndexPath> previousIndexPaths,
                                                                                                                                                                    boolean movementCancelled)
      • layoutAttributesForElementsInRect

        public NSArray<? extends UICollectionViewLayoutAttributes> layoutAttributesForElementsInRect​(CGRect rect)
        return an array layout attributes instances for all the views in the given rect
      • 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​(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​(UICollectionViewLayout oldLayout)
      • prepareForTransitionToLayout

        public void prepareForTransitionToLayout​(UICollectionViewLayout newLayout)
        UICollectionView calls this when prior the layout transition animation on the incoming and outgoing layout
      • 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​(org.moe.natj.objc.Class viewClass,
                                                         java.lang.String elementKind)
      • registerNibForDecorationViewOfKind

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

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

        public CGPoint targetContentOffsetForProposedContentOffset​(CGPoint proposedContentOffset)
        a layout can return the content offset to be applied during transition or update animations
      • 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

        public NSIndexPath targetIndexPathForInteractivelyMovingItemWithPosition​(NSIndexPath previousIndexPath,
                                                                                 CGPoint position)
      • 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.