larryryu / LSSwipeToDeleteCollectionViewLayout

The UICollectionViewLayout subclass adds swipe to delete functionality to a collectionview
MIT License
41 stars 4 forks source link

New delegate method to get current swipe location #5

Closed batkru closed 10 years ago

batkru commented 10 years ago

Added new delegate method that provides the current position of the cell pan gesture recognizer. This information can be useful to control additional transitions and presentation of elements.

larryryu commented 10 years ago

Nice! However i think the method should changed (see below) to avoid confusion even though we get a CGPoint initially.


-(void)swipeToDeleteLayout:(LSSwipeToDeleteCollectionViewLayout *)layout cellDidTranslateWithOffset:(UIOffset)offset
and implementation would be

[self.swipeToDeleteDelegate swipeToDeleteLayout:self cellDidTranslateWithOffset:UIOffsetMake(panGesturetranslation.x, panGesturetranslation.y)];
batkru commented 10 years ago

Awesome, I updated the commit to match your description. You can pull it now if you find it correct. Thanks! Also, can you update the cocoa pod?

Thanks!