Mimic UIAlertView Bounce?

cocoa-touch, core-animation, ios, iphone, uikit

Solution

You can use 2 animations, one to pop up to very large, and the other one to rescale back to normal size.

(This is the approach use by `UIAlertView` internally.)

Alternatively, you can use the lower-level `CAAnimation` and use `+[CAMediaTimingFunction functionWithControlPoints::::]` to make your own curve.

Problem

Whats the best way to mimic the bouncing animation from the UIAlertView on the iPhone? Is there some built-in mechanism for this? The UIAlertView itself won't work for my needs. I looked into animation curves but from what I can tell the only ones they provide are easeIn, easeOut, and linear.

Original source