Skip to content
Browse files

Fixed the SpringBoard demo so icons move to the correct location in s…

…crolled views when dragged.
  • Loading branch information...
1 parent 87f8f48 commit 1c8057a03fc3a09dc874a7bcc77e1cc0dc59a5b4 @iamcam iamcam committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 Examples/SpringBoard/Classes/SpringBoardViewController.m
View
2 Examples/SpringBoard/Classes/SpringBoardViewController.m
@@ -230,7 +230,7 @@ - (void) moveActionGestureRecognizerStateChanged: (UIGestureRecognizer *) recogn
CGRect r = [_gridView rectForItemAtIndex: _emptyCellIndex];
CGRect f = _draggingCell.frame;
f.origin.x = r.origin.x + floorf((r.size.width - f.size.width) * 0.5);
- f.origin.y = r.origin.y + floorf((r.size.height - f.size.height) * 0.5);
+ f.origin.y = r.origin.y + floorf((r.size.height - f.size.height) * 0.5) - _gridView.contentOffset.y;
NSLog( @"Gesture ended-- moving to %@", NSStringFromCGRect(f) );
_draggingCell.frame = f;

0 comments on commit 1c8057a

Please sign in to comment.
Something went wrong with that request. Please try again.