Inherits from UICollectionViewFlowLayout
Conforms to UIGestureRecognizerDelegate
Declared in OCAEditableCollectionViewFlowLayout.h

Overview

This class adds the ability to delete and/or re-order the UICollectionViewCells in the layout.

Portions created by: Created by Stan Chang Khin Boon on 1/10/12. https://github.com/lxcid/LXReorderableCollectionViewFlowLayout Copyright © 2012 d–buzz. All rights reserved.

And: MobileTuts+, Akiel Khan http://mobile.tutsplus.com/tutorials/iphone/uicollectionview-layouts/

In your UICollectionViewController subClass:

     - (void)awakeFromNib
     {
         // Allocate our custom collectionView layout
         OCAEditableCollectionViewFlowLayout *layout = [[OCAEditableCollectionViewFlowLayout alloc] init];
         // ...set some parameters to control its behavior (adjust to fit the needs of your app)
         layout.minimumInteritemSpacing  = 6;
         layout.minimumLineSpacing       = 6;
         layout.scrollDirection          = UICollectionViewScrollDirectionVertical;
         layout.sectionInset             = UIEdgeInsetsMake(5, 5, 5, 5);
         [layout setItemSize: CGSizeMake(50, 50)];

         // Set our layout on the collectionView
         self.collectionView.collectionViewLayout = layout;

         [super awakeFromNib];
     }

Properties

longPressGestureRecognizer

Handles long press recognition.

@property (strong, nonatomic, readonly) UILongPressGestureRecognizer *longPressGestureRecognizer

Discussion

Exposed to allow interaction with other gesture recognizers - for example:

    [gestureRecognizer requireGestureRecognizerToFail: layout.longPressGestureRecognizer];

Declared In

OCAEditableCollectionViewFlowLayout.h

panGestureRecognizer

Handles pan recognition.

@property (strong, nonatomic, readonly) UIPanGestureRecognizer *panGestureRecognizer

Discussion

Exposed to allow interaction with other gesture recognizers - for example:

    [gestureRecognizer requireGestureRecognizerToFail: layout.panGestureRecognizer];

Declared In

OCAEditableCollectionViewFlowLayout.h

scrollingSpeed

Controls the collection view’s scrolling speed

@property (assign, nonatomic) CGFloat scrollingSpeed

Discussion

Default is 300.0f

Declared In

OCAEditableCollectionViewFlowLayout.h

scrollingTriggerEdgeInsets

The inset to trigger scrolling before the user’s drag actually gets to the extreme edges of the screen

@property (assign, nonatomic) UIEdgeInsets scrollingTriggerEdgeInsets

Discussion

Default is 50.0f, 50.0f, 50.0f, 50.0f,

Declared In

OCAEditableCollectionViewFlowLayout.h

tapGestureRecognizer

Handles tap recognition.

@property (strong, nonatomic, readonly) UITapGestureRecognizer *tapGestureRecognizer

Discussion

Exposed to allow interaction with other gesture recognizers - for example:

    [gestureRecognizer requireGestureRecognizerToFail: layout.tapGestureRecognizer];

Declared In

OCAEditableCollectionViewFlowLayout.h