LXReorderableCollectionViewFlowLayout icon indicating copy to clipboard operation
LXReorderableCollectionViewFlowLayout copied to clipboard

drag-n-frop improvement

Open viking2009 opened this issue 12 years ago • 2 comments

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 avatar Oct 24 '13 12:10 viking2009

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);

viking2009 avatar Oct 25 '13 02:10 viking2009

Cool. It will take me sometime to merge this into master though. But keep the commits coming. Thanks for the help!

lxcid avatar Oct 25 '13 02:10 lxcid