Adding vibrancy to animations
A lot of animations on iOS look bouncy and feel natural. For instance, when an object starts moving in the real world, it rarely does so smoothly. Often, something moves because something else applied an initial force to it, causing it to have a certain momentum. Spring animations help you to apply this sort of real-world momentum to your animations.
Spring animations are usually configured with an initial speed. This speed is the momentum an object should have when it begins moving. All spring animations require damping to be set on them.
The value of this property specifies how much an object can overflow its target value. A smaller damping value will make your animation feel bouncier because it will float around its end value more drastically.
The easiest way to explore spring animations is by slightly refactoring the animation you just created for the drawer.
Instead of using an easeOut
animation when a user taps the Toggle Drawer button...