SwiftKickMobile / TLLayoutTransitioning

Enhanced transitioning between UICollectionView layouts in iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resize example crashes when double clicking a cell

opened this issue · comments

Tim, thank you very much for building this. I'm playing around the resize example. When double clicking a cell, the program crashes. The error message is: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the collection is already in the middle of an interactive transition'. I guess the beginIgnoringInteractionEvents and endIgnoringInteractionEvents calls should be added in collectionView:didSelectItemAtIndexPath:?

Yes, you can ignore events during the transition. But you can also cancel it in place and start a new transition. See “Cancelling a Transition” in the readme. In short, the cancelInteractiveTransitionInPlaceWithCompletion API can be called to cancel a transition before starting a new one. The cancel operation doesn’t complete immediately, so you’ve got to start the next transition in the completion block.

I will try to incorporate cancelInteractiveTransitionInPlaceWithCompletion into the sample project when I get some time.

Hope that helps.

Tim

On Nov 6, 2014, at 9:19 AM, dasocorp notifications@github.com wrote:

Tim, thank you very much for building this. I'm playing around the resize example. When double clicking a cell, the program crashes. The error message is: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the collection is already in the middle of an interactive transition'. I guess the beginIgnoringInteractionEvents and endIgnoringInteractionEvents calls should be added in collectionView:didSelectItemAtIndexPath:?


Reply to this email directly or view it on GitHub #14.