-
Notifications
You must be signed in to change notification settings - Fork 71
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
Inserting new cells #5
Comments
Hey – great question. I've had trouble doing this, too. Can you try the following?
That should work – let me know either way. |
thanks for the response, It seemed to partially work. I've started the count at 100, if I don't scroll to the bottom it will crash out. But if i'm within 2 rows of the insert it seems to work. |
Hmm... that's troubling. Could you zip up your source code and send it to [email protected] ? I'd be happy to take a look. |
sure, not a problem |
OK I've looked into it and the solution is to add new attachment behaviours when new cells are added to the collection view. This is done with the following method, or something similar to it.
There's one problem with it where it seems to cause a crash when you're at the end of the collection view. Does anyone have any ideas on this problem? |
It seems to be crashing when adding a behaviour that already exists for that indexPath. To test this, i've added just after the if statement and it stops crashing. |
Strange that it's trying to add duplicate index paths. Should we close this issue, then? |
I have no problems with that, seems to be working smoothly if with the added check. |
Made an addition to update the dynamic animator items and the behaviors when cells are inserted/deleted. #12 |
I've toyed around with the example provided and added a timer to fire
insertItemsAtIndexPaths
every few seconds. Since I want to use a ``NSFetchResultsController` later on.Not sure if i'm doing something wrong, but when the insert happens it crashes with
due to
[self.dynamicAnimator layoutAttributesForCellAtIndexPath:indexPath];
returning nil. How do I go about resolving this? I've noticed this same trend on other examples implementing the spring example.The text was updated successfully, but these errors were encountered: