Package apple.uikit

Class UICollectionView

    • Constructor Detail

      • UICollectionView

        protected UICollectionView​(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)
      • appearance

        public static java.lang.Object appearance()
      • appearanceForTraitCollection

        public static java.lang.Object appearanceForTraitCollection​(UITraitCollection trait)
      • appearanceForTraitCollectionWhenContainedIn

        @Deprecated
        public static java.lang.Object appearanceForTraitCollectionWhenContainedIn​(UITraitCollection trait,
                                                                                   UIAppearanceContainer ContainerClass,
                                                                                   java.lang.Object... varargs)
        Deprecated.
      • appearanceForTraitCollectionWhenContainedInInstancesOfClasses

        public static java.lang.Object appearanceForTraitCollectionWhenContainedInInstancesOfClasses​(UITraitCollection trait,
                                                                                                     NSArray<?> containerTypes)
      • appearanceWhenContainedIn

        @Deprecated
        public static java.lang.Object appearanceWhenContainedIn​(UIAppearanceContainer ContainerClass,
                                                                 java.lang.Object... varargs)
        Deprecated.
      • appearanceWhenContainedInInstancesOfClasses

        public static java.lang.Object appearanceWhenContainedInInstancesOfClasses​(NSArray<?> containerTypes)
      • areAnimationsEnabled

        public static boolean areAnimationsEnabled()
      • automaticallyNotifiesObserversForKey

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

        public static void beginAnimationsContext​(java.lang.String animationID,
                                                  org.moe.natj.general.ptr.VoidPtr context)
      • 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()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(java.lang.String identifier)
      • commitAnimations

        public static void commitAnimations()
      • 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()
      • inheritedAnimationDuration

        public static double inheritedAnimationDuration()
      • instanceMethodSignatureForSelector

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

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

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

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

        public static org.moe.natj.objc.Class layerClass()
      • new_objc

        public static java.lang.Object new_objc()
      • requiresConstraintBasedLayout

        public static boolean requiresConstraintBasedLayout()
      • resolveClassMethod

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

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

        public static void setAnimationBeginsFromCurrentState​(boolean fromCurrentState)
      • setAnimationCurve

        public static void setAnimationCurve​(long curve)
      • setAnimationDelay

        public static void setAnimationDelay​(double delay)
      • setAnimationDelegate

        public static void setAnimationDelegate​(java.lang.Object delegate)
      • setAnimationDidStopSelector

        public static void setAnimationDidStopSelector​(org.moe.natj.objc.SEL selector)
      • setAnimationDuration_static

        public static void setAnimationDuration_static​(double duration)
      • setAnimationRepeatAutoreverses

        public static void setAnimationRepeatAutoreverses​(boolean repeatAutoreverses)
      • setAnimationRepeatCount_static

        public static void setAnimationRepeatCount_static​(float repeatCount)
      • setAnimationStartDate

        public static void setAnimationStartDate​(NSDate startDate)
      • setAnimationTransitionForViewCache

        public static void setAnimationTransitionForViewCache​(long transition,
                                                              UIView view,
                                                              boolean cache)
      • setAnimationWillStartSelector

        public static void setAnimationWillStartSelector​(org.moe.natj.objc.SEL selector)
      • setAnimationsEnabled

        public static void setAnimationsEnabled​(boolean enabled)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long userInterfaceLayoutDirectionForSemanticContentAttribute​(long attribute)
      • userInterfaceLayoutDirectionForSemanticContentAttributeRelativeToLayoutDirection

        public static long userInterfaceLayoutDirectionForSemanticContentAttributeRelativeToLayoutDirection​(long semanticContentAttribute,
                                                                                                            long layoutDirection)
      • version_static

        public static long version_static()
      • allowsMultipleSelection

        public boolean allowsMultipleSelection()
        default is NO
      • allowsSelection

        public boolean allowsSelection()
        default is YES
      • _appearance

        public java.lang.Object _appearance()
        Description copied from interface: UIAppearance
        To customize the appearance of all instances of a class, send the relevant appearance modification messages to the appearance proxy for the class. For example, to modify the bar tint color for all UINavigationBar instances: [[UINavigationBar appearance] setBarTintColor:myColor]; Note for iOS7: On iOS7 the tintColor property has moved to UIView, and now has special inherited behavior described in UIView.h. This inherited behavior can conflict with the appearance proxy, and therefore tintColor is now disallowed with the appearance proxy.
        Specified by:
        _appearance in interface UIAppearance
        Overrides:
        _appearance in class UIScrollView
      • _appearanceWhenContainedIn

        @Deprecated
        public java.lang.Object _appearanceWhenContainedIn​(UIAppearanceContainer ContainerClass,
                                                           java.lang.Object... varargs)
        Deprecated.
        Description copied from interface: UIAppearance
        To customize the appearances for instances of a class contained within an instance of a container class, or instances in a hierarchy, use +appearanceWhenContainedInInstancesOfClasses: for the appropriate appearance proxy. For example: [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UISplitViewController class]]] setBarTintColor:myColor]; [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UITabBarController class], [UISplitViewController class]]] setBarTintColor:myTabbedNavBarColor]; In any given view hierarchy the outermost appearance proxy wins. Specificity (depth of the chain) is the tie-breaker. In other words, the containment statement is treated as a partial ordering. Given a concrete ordering (actual subview hierarchy), we select the partial ordering that is the first unique match when reading the actual hierarchy from the window down.
        Specified by:
        _appearanceWhenContainedIn in interface UIAppearance
        Overrides:
        _appearanceWhenContainedIn in class UIScrollView
      • backgroundView

        public UIView backgroundView()
        will be automatically resized to track the size of the collection view and placed behind all cells and supplementary views.
      • beginInteractiveMovementForItemAtIndexPath

        public boolean beginInteractiveMovementForItemAtIndexPath​(NSIndexPath indexPath)
        returns NO if reordering was prevented from beginning - otherwise YES
      • cancelInteractiveMovement

        public void cancelInteractiveMovement()
      • cancelInteractiveTransition

        public void cancelInteractiveTransition()
      • delegate

        public java.lang.Object delegate()
        Description copied from class: UIScrollView
        default nil. weak reference
        Overrides:
        delegate in class UIScrollView
      • deleteItemsAtIndexPaths

        public void deleteItemsAtIndexPaths​(NSArray<? extends NSIndexPath> indexPaths)
      • deleteSections

        public void deleteSections​(NSIndexSet sections)
      • dequeueReusableCellWithReuseIdentifierForIndexPath

        public UICollectionViewCell dequeueReusableCellWithReuseIdentifierForIndexPath​(java.lang.String identifier,
                                                                                       NSIndexPath indexPath)
      • dequeueReusableSupplementaryViewOfKindWithReuseIdentifierForIndexPath

        public UICollectionReusableView dequeueReusableSupplementaryViewOfKindWithReuseIdentifierForIndexPath​(java.lang.String elementKind,
                                                                                                              java.lang.String identifier,
                                                                                                              NSIndexPath indexPath)
      • deselectItemAtIndexPathAnimated

        public void deselectItemAtIndexPathAnimated​(NSIndexPath indexPath,
                                                    boolean animated)
      • endInteractiveMovement

        public void endInteractiveMovement()
      • finishInteractiveTransition

        public void finishInteractiveTransition()
      • indexPathsForSelectedItems

        public NSArray<? extends NSIndexPath> indexPathsForSelectedItems()
        returns nil or an array of selected index paths
      • indexPathsForVisibleItems

        public NSArray<? extends NSIndexPath> indexPathsForVisibleItems()
      • indexPathsForVisibleSupplementaryElementsOfKind

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

        public void insertItemsAtIndexPaths​(NSArray<? extends NSIndexPath> indexPaths)
      • insertSections

        public void insertSections​(NSIndexSet sections)
        These methods allow dynamic modification of the current set of items in the collection view
      • isPrefetchingEnabled

        public boolean isPrefetchingEnabled()
      • setPrefetchingEnabled

        public void setPrefetchingEnabled​(boolean value)
      • moveItemAtIndexPathToIndexPath

        public void moveItemAtIndexPathToIndexPath​(NSIndexPath indexPath,
                                                   NSIndexPath newIndexPath)
      • moveSectionToSection

        public void moveSectionToSection​(long section,
                                         long newSection)
      • numberOfItemsInSection

        public long numberOfItemsInSection​(long section)
      • numberOfSections

        public long numberOfSections()
        Information about the current state of the collection view.
      • registerClassForCellWithReuseIdentifier

        public void registerClassForCellWithReuseIdentifier​(org.moe.natj.objc.Class cellClass,
                                                            java.lang.String identifier)
        For each reuse identifier that the collection view will use, register either a class or a nib from which to instantiate a cell. If a nib is registered, it must contain exactly 1 top level object which is a UICollectionViewCell. If a class is registered, it will be instantiated via alloc/initWithFrame:
      • registerClassForSupplementaryViewOfKindWithReuseIdentifier

        public void registerClassForSupplementaryViewOfKindWithReuseIdentifier​(org.moe.natj.objc.Class viewClass,
                                                                               java.lang.String elementKind,
                                                                               java.lang.String identifier)
      • registerNibForCellWithReuseIdentifier

        public void registerNibForCellWithReuseIdentifier​(UINib nib,
                                                          java.lang.String identifier)
      • registerNibForSupplementaryViewOfKindWithReuseIdentifier

        public void registerNibForSupplementaryViewOfKindWithReuseIdentifier​(UINib nib,
                                                                             java.lang.String kind,
                                                                             java.lang.String identifier)
      • reloadData

        public void reloadData()
        discard the dataSource and delegate data and requery as necessary
      • reloadItemsAtIndexPaths

        public void reloadItemsAtIndexPaths​(NSArray<? extends NSIndexPath> indexPaths)
      • reloadSections

        public void reloadSections​(NSIndexSet sections)
      • remembersLastFocusedIndexPath

        public boolean remembersLastFocusedIndexPath()
        defaults to NO. If YES, when focusing on a collection view the last focused index path is focused automatically. If the collection view has never been focused, then the preferred focused index path is used.
      • scrollToItemAtIndexPathAtScrollPositionAnimated

        public void scrollToItemAtIndexPathAtScrollPositionAnimated​(NSIndexPath indexPath,
                                                                    long scrollPosition,
                                                                    boolean animated)
        Interacting with the collection view.
      • selectItemAtIndexPathAnimatedScrollPosition

        public void selectItemAtIndexPathAnimatedScrollPosition​(NSIndexPath indexPath,
                                                                boolean animated,
                                                                long scrollPosition)
      • setAllowsMultipleSelection

        public void setAllowsMultipleSelection​(boolean value)
        default is NO
      • setAllowsSelection

        public void setAllowsSelection​(boolean value)
        default is YES
      • setBackgroundView

        public void setBackgroundView​(UIView value)
        will be automatically resized to track the size of the collection view and placed behind all cells and supplementary views.
      • setCollectionViewLayoutAnimated

        public void setCollectionViewLayoutAnimated​(UICollectionViewLayout layout,
                                                    boolean animated)
        transition from one layout to another
      • setDelegate

        public void setDelegate​(java.lang.Object value)
        Description copied from class: UIScrollView
        default nil. weak reference
        Overrides:
        setDelegate in class UIScrollView
      • setRemembersLastFocusedIndexPath

        public void setRemembersLastFocusedIndexPath​(boolean value)
        defaults to NO. If YES, when focusing on a collection view the last focused index path is focused automatically. If the collection view has never been focused, then the preferred focused index path is used.
      • supplementaryViewForElementKindAtIndexPath

        public UICollectionReusableView supplementaryViewForElementKindAtIndexPath​(java.lang.String elementKind,
                                                                                   NSIndexPath indexPath)
      • updateInteractiveMovementTargetPosition

        public void updateInteractiveMovementTargetPosition​(CGPoint targetPosition)
      • dataSourceSectionIndexForPresentationSectionIndex

        public long dataSourceSectionIndexForPresentationSectionIndex​(long presentationSectionIndex)
        Description copied from interface: UIDataSourceTranslating
        Translate (if needed) a Presentation section index to its Data Source section index value. If section was inserted and not known the Data Source, this will return NSNotFound. If no effective change took place, will return passed value.
        Specified by:
        dataSourceSectionIndexForPresentationSectionIndex in interface UIDataSourceTranslating
      • dragInteractionEnabled

        public boolean dragInteractionEnabled()
        To enable intra-app drags on iPhone, set this to YES. You can also force drags to be disabled for this collection view by setting this to NO. By default, For iPad this will return YES and iPhone will return NO.
      • hasActiveDrag

        public boolean hasActiveDrag()
        YES if a drag session is currently active. A drag session begins after items are "lifted" from the collection view.
      • hasActiveDrop

        public boolean hasActiveDrop()
        YES if collection view is currently tracking a drop session.
      • hasUncommittedUpdates

        public boolean hasUncommittedUpdates()
        Returns YES if the collection view is reordering or has drop placeholders.
      • presentationSectionIndexForDataSourceSectionIndex

        public long presentationSectionIndexForDataSourceSectionIndex​(long dataSourceSectionIndex)
        Description copied from interface: UIDataSourceTranslating
        Translate (if needed) a Data Source section index to its Presentation section index value. If section was deleted during a transaction, this will return NSNotFound. If no effective change took place, will return passed value.
        Specified by:
        presentationSectionIndexForDataSourceSectionIndex in interface UIDataSourceTranslating
      • reorderingCadence

        public long reorderingCadence()
        Reordering cadence affects how easily reordering occurs while dragging around a reorder-capable drop destination. Default is UICollectionViewReorderingCadenceImmediate.
      • setDragInteractionEnabled

        public void setDragInteractionEnabled​(boolean value)
        To enable intra-app drags on iPhone, set this to YES. You can also force drags to be disabled for this collection view by setting this to NO. By default, For iPad this will return YES and iPhone will return NO.
      • setReorderingCadence

        public void setReorderingCadence​(long value)
        Reordering cadence affects how easily reordering occurs while dragging around a reorder-capable drop destination. Default is UICollectionViewReorderingCadenceImmediate.
      • allowsMultipleSelectionDuringEditing

        public boolean allowsMultipleSelectionDuringEditing()
        Controls whether multiple item selection can occur when the receiver is editing. Defaults to NO.
      • allowsSelectionDuringEditing

        public boolean allowsSelectionDuringEditing()
        Controls whether an item can be selected when the receiver is editing. Defaults to NO.
      • isEditing

        public boolean isEditing()
        Controls the editing state for the receiver.
      • selectionFollowsFocus

        public boolean selectionFollowsFocus()
        When enabled, the collection view ensures that selection is automatically triggered when focus moves to a cell.
      • setAllowsMultipleSelectionDuringEditing

        public void setAllowsMultipleSelectionDuringEditing​(boolean value)
        Controls whether multiple item selection can occur when the receiver is editing. Defaults to NO.
      • setAllowsSelectionDuringEditing

        public void setAllowsSelectionDuringEditing​(boolean value)
        Controls whether an item can be selected when the receiver is editing. Defaults to NO.
      • setEditing

        public void setEditing​(boolean value)
        Controls the editing state for the receiver.
      • setSelectionFollowsFocus

        public void setSelectionFollowsFocus​(boolean value)
        When enabled, the collection view ensures that selection is automatically triggered when focus moves to a cell.