Ramotion / expanding-collection

:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion
https://www.ramotion.com/smartphone-app-development-ui-library-to-peek-and-pop-cards/
MIT License
5.55k stars 530 forks source link

Need help understands View Archiving #31

Closed ghost closed 6 years ago

ghost commented 8 years ago

Hey there,

Thank you very much for the great work and your contribution. I am having a hard time understanding the logic behind archive and unarchive in TransitionDriver. It seems the we are unarchiving right after archiving. Is there any specific reason for this.

av0c0der commented 7 years ago

@mosn this trick allow you to copy view object. If you add any view to some other view, it leaves superview and becomes to new one. You can't have one view object in two hierarchies and therefore you must have a copy.