在iOS版的UITableViewCell春季动画 [英] iOS spring animation on UITableViewCell
本文介绍了在iOS版的UITableViewCell春季动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有自定义的UITableViewCell我的应用程序。当我在这个小区挖掘,我想这个小区从左至右执行一些弹簧效果的动画。我该怎么办这样的动画呢?
I have custom UITableViewCell in my app. When I tap on this cell I would like to this cell perform some spring effect animation from left to right. How can I do such animation?
推荐答案
通过 animateWithDuration:动画:
你可以做一些奇妙的东西。
With animateWithDuration: animation:
you can do some neat stuff.
它用于这样的:
[UIView animateWithDuration:(float duration) animation^{(block)}];
持续时间
是时候将采取执行动画
和块
是是假设的内发生持续时间
,例如:
Duration
is the time it will take to perform the animation
, and the block
is what is suppose to happen within the duration
, for example:
cell.center = CGPointMake(cell.center.x+50, cell.center);
这篇关于在iOS版的UITableViewCell春季动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文