drag-n-frop improvement
Opened this issue · 2 comments
viking2009 commented
may be this will be better solution
CGRect intersectionFrame = CGRectIntersection(self.currentView.frame, theFrame);
if (intersectionFrame.size.height > theFrame.size.height/2 && intersectionFrame.size.width > theFrame.size.width/2) {
[self dropCurrentItemOnIndexPath:newIndePath];
} else {
[self moveCurrentItemToIndexPath:newIndePath];
}
viking2009 commented
if there is a small line or item spacing moveCurrentItemToIndexPath never called
so revert to previous condition
in my project (vertical layout with 2pt line spacing, and one elements in row) I use
CGRectDivide(theFrame, &theLeftFrame, &theRightFrame, CGRectGetHeight(theFrame) / 2.0f, CGRectMinYEdge);
lxcid commented
Cool. It will take me sometime to merge this into master though. But keep the commits coming. Thanks for the help!