See more
UIView.animateWithDuration(0.5, delay: 0, usingSpringWithDamping: 0.3, initialSpringVelocity: 0.8, options: nil, animations: { //object you want to animate}, completion: nil)