Skip to content
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 on [self.dynamicAnimator addBehavior:springBehaviour]; #21

Open
bukira opened this issue Oct 20, 2015 · 3 comments
Open

crash on [self.dynamicAnimator addBehavior:springBehaviour]; #21

bukira opened this issue Oct 20, 2015 · 3 comments

Comments

@bukira
Copy link

bukira commented Oct 20, 2015

I get the following crash on the about line

*** Assertion failure in -[UIDynamicAnimator _registerBodyForItem:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3505.17/UIDynamicAnimator.m:872
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid size {0, 0} for item <UICollectionViewLayoutAttributes: 0x159b7cb0> index path: (<NSIndexPath: 0x158fa0a0> {length = 2, path = 0 - 6}); frame = (0 0; 0 0); in Dynamics'

@x401om
Copy link

x401om commented Apr 12, 2016

If you are trying to change layout when view with UIDynamicAnimator isn't on screen (e.g. modal controller is opened), you'll get this crash.

@juliengdt
Copy link

juliengdt commented Jul 18, 2016

Problem: If you are trying to insert/delete cell that are not on screen, you will get a exception on frame/indexPath stuff.

Solution: Delete override for method prepareForCollectionViewUpdates. Nothing to do in it. Relica for another Spring animation (for falling animation on deletion)

if you want a bit cleaner: https://gist.github.com/juliengdt/df69cf601277216008319013bc87269a

@ashfurrow you can modify your implementation by using my gist if you want. no prob

@ashfurrow
Copy link
Contributor

Yup, would love to but I'm not in the T+L organization anymore, so I'm afraid I can't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants