-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash while dragging cells #1
Comments
Yeah, a friend at Apple found that too— it crashes in the sample when you drag down to the bottom (i.e. out of the actual allocated range). I think it's a simple fix: never try to move the empty cell placeholder beyond the bounds of the available cell list, i.e. MAX(attemptedCellIndex, numberOfCells-1). I'll try to put a fix together for that today. |
Thanks! |
Fixed at this commit. AQGridViewData now returns NSNotFound when asked for a cell index based on a point which doesn't correspond to a real cell. The SpringBoard application now observes this return value and uses the index of the last cell in the list instead, which matches the behaviour of Apple's springboard. The same thing happens now if you drag a cell off the edge of the screen. |
I'm experimenting with the code provided and it is really useful; however, I found that the sample (springboard) code crashes, if you reduce the number of icons down to 19, then try to move to an empty spot.
The text was updated successfully, but these errors were encountered: