iOS has integrated full physics engine to UIKit. Which not only integrate physics-related capabilities but adds smooth and fascinating animations by using underlying iOS Physics engine and provided dynamic items what we send in API. One can use the UIDynamicAnimator to have smooth bounce effect.
Here I’m going to tell you step-by-step to achieve the bouncy effects on UIObject(“titleLabel” in this example)
1- create global variable of type UIDynamicAnimator & UIGravityBehavior:
var viewAnimator: UIDynamicAnimator!
var gravityBehavior: UIGravityBehavior!
2- Now, in the function where you want to execute the bounce effects, initialise the animator(created above) with a reference view(Say self.view or superView).