Skip to content

Commit 1c8057a

Browse files
author
Cameron
committed
Fixed the SpringBoard demo so icons move to the correct location in scrolled views when dragged.
1 parent 87f8f48 commit 1c8057a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Examples/SpringBoard/Classes/SpringBoardViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ - (void) moveActionGestureRecognizerStateChanged: (UIGestureRecognizer *) recogn
230230
CGRect r = [_gridView rectForItemAtIndex: _emptyCellIndex];
231231
CGRect f = _draggingCell.frame;
232232
f.origin.x = r.origin.x + floorf((r.size.width - f.size.width) * 0.5);
233-
f.origin.y = r.origin.y + floorf((r.size.height - f.size.height) * 0.5);
233+
f.origin.y = r.origin.y + floorf((r.size.height - f.size.height) * 0.5) - _gridView.contentOffset.y;
234234
NSLog( @"Gesture ended-- moving to %@", NSStringFromCGRect(f) );
235235
_draggingCell.frame = f;
236236

0 commit comments

Comments
 (0)