PaoloCuscela / Cards

Awesome iOS 11 appstore cards in swift 5.
MIT License
4.2k stars 274 forks source link

Fix card closing animation issue #78

Closed amerhukic closed 6 years ago

amerhukic commented 6 years ago

This pull request fixes the issue #56.
At the time when the animation in the completion block of the first animation executes the self.card.originalFrame changes because of detailVC.layout(originalFrame, isPresenting: false, transform: bounce) in the first part of the animation. That is why we have to preserve the originalFrame before executing the animations and use that value when animating.