SpringBoard - cell drops to bottom then back into place #60

Closed
philtim opened this Issue May 6, 2011 · 3 comments

Comments

Projects
None yet
4 participants
@philtim

philtim commented May 6, 2011

Using the SpringBoard example I get a strange behavior when changing _gridview.scrollable to YES and increasing the items to e.g. 40:

Dragging cells around works as expected until the view is scrolled down. Once scrolled down, drag any cell and drop it at the new place. What happens is that the cell first moves all the way down out of screen and snaps then back to the new location.

@iamcam

This comment has been minimized.

Show comment Hide comment
@iamcam

iamcam May 7, 2011

Contributor

I'm experiencing this as well... "tested" it extensively and kind of figured out what's going on. For each row that's scrolled out of view, the cell gets animated to the new position one row lower than where you let go, but snaps immediately to where you wanted it. Scroll the first two rows out and the cell will get placed two rows down then snapped into position. Three... three rows down, etc.

The misplacement occurs in -moveActionGestureRecognizerStateChanged at the UIGestureRecognizerStateEnded case. I'm sure it's just some kind of math thing on the destination frame vs scrolled distance.

Contributor

iamcam commented May 7, 2011

I'm experiencing this as well... "tested" it extensively and kind of figured out what's going on. For each row that's scrolled out of view, the cell gets animated to the new position one row lower than where you let go, but snaps immediately to where you wanted it. Scroll the first two rows out and the cell will get placed two rows down then snapped into position. Three... three rows down, etc.

The misplacement occurs in -moveActionGestureRecognizerStateChanged at the UIGestureRecognizerStateEnded case. I'm sure it's just some kind of math thing on the destination frame vs scrolled distance.

@emrosenf

This comment has been minimized.

Show comment Hide comment
@emrosenf

emrosenf May 7, 2011

iamcam is right. I fixed this for myself earlier:

f.origin.y = r.origin.y + floorf((r.size.height - f.size.height) * 0.5)-self.gridView.contentOffset.y;

emrosenf commented May 7, 2011

iamcam is right. I fixed this for myself earlier:

f.origin.y = r.origin.y + floorf((r.size.height - f.size.height) * 0.5)-self.gridView.contentOffset.y;

@iamcam

This comment has been minimized.

Show comment Hide comment
@iamcam

iamcam May 9, 2011

Contributor

I'll get a pull request in on that.

Contributor

iamcam commented May 9, 2011

I'll get a pull request in on that.

AlanQuatermain added a commit that referenced this issue May 9, 2011

@evadne evadne closed this Aug 22, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment