lukescott / DraggableCollectionView

Extension for the UICollectionView and UICollectionViewLayout that allows a user to move items with drag and drop. --- HELP WANTED --- Looking for maintainer and help with the experimental branch.
MIT License
549 stars 175 forks source link

Fixes #21 #22

Open benoit-pereira-da-silva opened 11 years ago

benoit-pereira-da-silva commented 11 years ago

We disable on UIKeyboardWillShowNotification and re-enable on UIKeyboardDidHideNotification if necessary to prevent from an IOS SDK internal bug : UICollectionViewUpdateItem missing selector crash.

lukescott commented 11 years ago
benoit-pereira-da-silva commented 11 years ago

Sorry for the approximative english ( i'm a french frog)

lukescott commented 11 years ago

I've actually never used addObserverForName:object:queue:usingBlock:. Didn't realize that it returned the observer. I prefer addObserver:selector:name:object: because you can simply do removeObserver:self to remove all observers in one call. It ensures all future observers are cleaned up. In this case I prefer not to use blocks.

The LSCollectionViewHelper is released when your UICollectionView is, by association.

I feel there are too many edge cases with this patch. It would be better if:

To be honest I feel like this issue may be beyond the scope of this addon. One thing I can do is add a "will begin dragging" delegate call so you can dismiss the keyboard if the user begins dragging. If the text field takes up the entire cell, it may be better just to keep draggable disabled until you enable it with a button or something. The long press may be interfering with the text loupe anyway.

benoit-pereira-da-silva commented 11 years ago

Thanks for taking the time to analyze. The will begin dragging idea is not bad.