模仿UIAlertView Bounce? [英] Mimic UIAlertView Bounce?

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

问题描述

什么是模仿iPhone上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.

我查看了动画曲线,但据我所知,他们提供的只有easeIn,easeOut和linear。

I looked into animation curves but from what I can tell the only ones they provide are easeIn, easeOut, and linear.

推荐答案

您可以使用2个动画,一个弹出非常大,另一个重新缩放回正常大小。

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

(这是内部使用 UIAlertView 的方法。)

(This is the approach use by UIAlertView internally.)

或者,您可以使用较低级 CAAnimation 并使用 + [CAMediaTimingFunction functionWithControlPoints ::::] 制作自己的曲线。

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

这篇关于模仿UIAlertView Bounce?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆