Animation vs. transition:
animation: animate a view onscreen from one state to another.
transition: animate the insertion of a new view or the removal of an existing view.
the transition should be associated with an animation, otherwise, it won't work on its own.
By default, views transition on/offscreen by fading in/out. You can customize this by using transition(_:).