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
-
elementKindproperty
Accessing the Item Changes
-
indexPathBeforeUpdateproperty -
indexPathAfterUpdateproperty -
updateActionproperty
Properties
elementKind
The type of the item. (read-only)
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)
Availability
- Available in iOS 6.0 and later.
Declared In
UICollectionViewLayout.hindexPathBeforeUpdate
The index path of the item before the update. (read-only)
Availability
- Available in iOS 6.0 and later.
Declared In
UICollectionViewLayout.hupdateAction
The action being performed on the item. (read-only)
Discussion
For a list of relevant action types, see “UICollectionUpdateAction”.
Availability
- Available in iOS 6.0 and later.
Declared In
UICollectionViewLayout.hConstants
UICollectionUpdateAction
Constants indicating the type of action being performed on an item.
enum {
UICollectionUpdateActionNone,
UICollectionUpdateActionInsert,
UICollectionUpdateActionDelete,
UICollectionUpdateActionReload,
UICollectionUpdateActionMove
};
typedef NSUInteger UICollectionUpdateAction;
Constants
UICollectionUpdateActionNoneTake no action on the item.
Available in iOS 6.0 and later.
Declared in
UICollectionViewLayout.h.UICollectionUpdateActionInsertInsert the item into the collection view.
Available in iOS 6.0 and later.
Declared in
UICollectionViewLayout.h.UICollectionUpdateActionDeleteRemove the item from the collection view.
Available in iOS 6.0 and later.
Declared in
UICollectionViewLayout.h.UICollectionUpdateActionReloadReload the item, which consists of deleting and then inserting the item.
Available in iOS 6.0 and later.
Declared in
UICollectionViewLayout.h.UICollectionUpdateActionMoveMove the item from its current location to a new location.
Available in iOS 6.0 and later.
Declared in
UICollectionViewLayout.h.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)