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.

Tasks

Accessing the Item Changes

Properties

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.