diff --git a/DraggableCollectionView.podspec b/DraggableCollectionView.podspec new file mode 100644 index 0000000..de5c462 --- /dev/null +++ b/DraggableCollectionView.podspec @@ -0,0 +1,13 @@ +Pod::Spec.new do |s| +s.name = "DraggableCollectionView" +s.version = "0.1" +s.summary = "Extension for the UICollectionView and UICollectionViewLayout that allows a user to move items with drag and drop." +s.homepage = "https://github.com/lognllc/DraggableCollectionView" +s.license = { :type => 'MIT', :file => 'LICENSE' } +s.authors = [ 'Luke Scott', 'Rex Sheng' ] +s.source = { :git => "https://github.com/angelvasa/DraggableCollectionView.git", :tag => s.version.to_s } +s.platform = :ios, '6.0' +s.requires_arc = true +s.source_files = 'DraggableCollectionView', 'DraggableCollectionView/**/*.{h,m}' + +end \ No newline at end of file diff --git a/DraggableCollectionView/Helpers/LSCollectionViewHelper.m b/DraggableCollectionView/Helpers/LSCollectionViewHelper.m index 77929f6..54ace6a 100644 --- a/DraggableCollectionView/Helpers/LSCollectionViewHelper.m +++ b/DraggableCollectionView/Helpers/LSCollectionViewHelper.m @@ -152,6 +152,17 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogni return NO; } + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { + if (gestureRecognizer.numberOfTouches < 1) { + return YES; + } else { + return NO; + } +} + + + - (NSIndexPath *)indexPathForItemClosestToPoint:(CGPoint)point { NSArray *layoutAttrsInRect;