lxcid / LXReorderableCollectionViewFlowLayout

Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.
http://lxcid.com/
MIT License
1.86k stars 328 forks source link

Bug and Feature Request #9

Closed remaerd closed 11 years ago

remaerd commented 11 years ago

Thank you for your codes, really save me a lot of time. Unfortunately, something wrong when I try to use it. I'm writing everything with codes so no storyboard stuff. Here's my problems:

Screen Shot 2013-01-05 at 12 09 40 AM

Thank you for your code.

lxcid commented 11 years ago

Hi @remaerd,

For your first problem, #11 should have solved it. :)

About your second problem, I'm not exactly sure whats your implementation and your requirement from your explanation.

If you want to prevent the cell from moving or beginning to move, try using the following interface?

- (BOOL)collectionView:(UICollectionView *)theCollectionView layout:(UICollectionViewLayout *)theLayout itemAtIndexPath:(NSIndexPath *)theFromIndexPath shouldMoveToIndexPath:(NSIndexPath *)theToIndexPath;
- (BOOL)collectionView:(UICollectionView *)theCollectionView layout:(UICollectionViewLayout *)theLayout shouldBeginReorderingAtIndexPath:(NSIndexPath *)theIndexPath;

If you are looking for drag and drop feature, I have a experimental implementation that I have yet to merge to master at https://github.com/lxcid/LXReorderableCollectionViewFlowLayout/tree/experimental-drag-and-drop-into-item

I'm not exactly sure how I can merge the drag and drop into the master yet and its not a very high priority for me right now as I don't have strong use case yet.

I'm closing the issue for now though as I have provided the solution to your problem. :) Cheers!