Conforms to UICollectionViewDataSource
Declared in OCAEditableCollectionViewFlowLayout.h

Overview

An object that adopts the OCAEditableCollectionViewDataSource protocol may optionally be notified and control movement of cells.

Instance Methods

collectionView:canMoveItemAtIndexPath:

Ask the delegate if the cell at indexPath can be moved.

- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath

Parameters

collectionView

the UICollectionView containing the cell.

indexPath

the indexPath of the cell.

Return Value

YES if the move is allowed, NO otherwise

Declared In

OCAEditableCollectionViewFlowLayout.h

collectionView:itemAtIndexPath:canMoveToIndexPath:

Ask the delegate if the cell at fromIndexPath can be moved to toIndexPath.

- (BOOL)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath canMoveToIndexPath:(NSIndexPath *)toIndexPath

Parameters

collectionView

the UICollectionView containing the cell.

fromIndexPath

the indexPath of the cell to move.

toIndexPath

the indexPath where the cell will move.

Return Value

YES if the move is allowed, NO otherwise

Declared In

OCAEditableCollectionViewFlowLayout.h

collectionView:itemAtIndexPath:didMoveToIndexPath:

Inform the delegate the cell at indexPath has moved.

- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath didMoveToIndexPath:(NSIndexPath *)toIndexPath

Parameters

collectionView

the UICollectionView containing the cell.

fromIndexPath

the indexPath of the cell to move.

toIndexPath

the indexPath where the cell will move.

Declared In

OCAEditableCollectionViewFlowLayout.h

collectionView:itemAtIndexPath:willMoveToIndexPath:

Inform the delegate the cell at indexPath is about to be moved.

- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willMoveToIndexPath:(NSIndexPath *)toIndexPath

Parameters

collectionView

the UICollectionView containing the cell.

fromIndexPath

the indexPath of the cell to move.

toIndexPath

the indexPath where the cell will move.

Declared In

OCAEditableCollectionViewFlowLayout.h