UICollectionViewUpdateItem Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/UIKit.framework
Availability
Available in iOS 6.0 and later.
Declared in
UICollectionViewLayout.h

Overview

The UICollectionViewUpdateItem class describes a single change to make to an item in a collection view. You do not create instances of this class directly. When updating its content, the collection view object creates them and passes them to the layout object’s prepareForCollectionViewUpdates: method, which can use them to prepare the layout object for the upcoming changes.

This class is used to describe updates for cells, supplementary views, and decoration views. Use the elementKind property to determine the type of the item.

Tasks

Accessing the Item Type

Accessing the Item Changes

Properties

elementKind

The type of the item. (read-only)

@property (nonatomic, readonly) NSString *elementKind
Discussion

Cells have a type of UICollectionElementKindCell. Supplementary views have a type that is defined by the layout object that supports it.

indexPathAfterUpdate

The index path of the item after the update. (read-only)

@property (nonatomic, readonly) NSIndexPath *indexPathAfterUpdate
Availability
  • Available in iOS 6.0 and later.
Declared In
UICollectionViewLayout.h

indexPathBeforeUpdate

The index path of the item before the update. (read-only)

@property (nonatomic, readonly) NSIndexPath *indexPathBeforeUpdate
Availability
  • Available in iOS 6.0 and later.
Declared In
UICollectionViewLayout.h

updateAction

The action being performed on the item. (read-only)

@property (nonatomic, readonly) UICollectionUpdateAction updateAction
Discussion

For a list of relevant action types, see “UICollectionUpdateAction”.

Availability
  • Available in iOS 6.0 and later.
Declared In
UICollectionViewLayout.h

Constants

UICollectionUpdateAction

Constants indicating the type of action being performed on an item.

enum {
   UICollectionUpdateActionNone,
   UICollectionUpdateActionInsert,
   UICollectionUpdateActionDelete,
   UICollectionUpdateActionReload,
   UICollectionUpdateActionMove
};
typedef NSUInteger UICollectionUpdateAction;
Constants
UICollectionUpdateActionNone

Take no action on the item.

Available in iOS 6.0 and later.

Declared in UICollectionViewLayout.h.

UICollectionUpdateActionInsert

Insert the item into the collection view.

Available in iOS 6.0 and later.

Declared in UICollectionViewLayout.h.

UICollectionUpdateActionDelete

Remove the item from the collection view.

Available in iOS 6.0 and later.

Declared in UICollectionViewLayout.h.

UICollectionUpdateActionReload

Reload the item, which consists of deleting and then inserting the item.

Available in iOS 6.0 and later.

Declared in UICollectionViewLayout.h.

UICollectionUpdateActionMove

Move the item from its current location to a new location.

Available in iOS 6.0 and later.

Declared in UICollectionViewLayout.h.


Did this document help you? Yes It's good, but... Not helpful...