模仿 UIAlertView 反弹?

Mimic UIAlertView Bounce?(模仿 UIAlertView 反弹?)

本文介绍了模仿 UIAlertView 反弹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

解决方案

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.

这篇关于模仿 UIAlertView 反弹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:模仿 UIAlertView 反弹?

基础教程推荐