fikir vermesi açısından.
UIView animation ve transform property'sini kullanılarak basitçe şöyle bir custom bouncing animasyonu yapılabilir.
@IBAction func buttonAaction(sender: AnyObject) {
var tempView:UIView = UIView(frame: CGRectMake(20, 20, 280, 100))
tempView.backgroundColor = UIColor.redColor()
tempView.alpha = 0
self.view.addSubview(tempView)
var starttingScaleTransform:CGAffineTransform = CGAffineTransformMakeScale(0.0, 0.0)
tempView.transform = starttingScaleTransform
UIView.animateWithDuration(0.2, delay: 0.0, options: UIViewAnimationOptions.CurveEaseOut, animations: { () -> Void in
tempView.alpha = 1
var bouncingScaleUpTransform:CGAffineTransform = CGAffineTransformMakeScale(1.1, 1.1)
tempView.transform = bouncingScaleUpTransform
}) { (Bool) -> Void in
UIView.animateWithDuration(0.1, delay: 0.0, options: UIViewAnimationOptions.CurveEaseIn, animations: { () -> Void in
tempView.alpha = 1
var bouncingScaleDownTransform:CGAffineTransform = CGAffineTransformMakeScale(1.0, 1.0)
tempView.transform = bouncingScaleDownTransform
}, completion: nil)
}
}