我正在制作一个基于视图的应用程序,我希望给视图水的效果。请帮帮我。
我正在使用下面的代码
[UIView beginAnimations:@"rippleEffect" context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:(UIViewAnimationTransition)110 forView:view cache:NO];
[UIView commitAnimations];发布于 2013-01-17 18:54:23
你可以通过点击按钮来设置查看答案,我只是在谷歌上搜索一下,就得到了答案FROM
首先,您需要在项目中添加目标文件->构建阶段->将二进制文件与库链接单击+ button.
#import <QuartzCore/QuartzCore.h> in .m
现在实现这个按钮的IBAction
-(IBAction)btnActionTapped:(id)sender{
CATransition *animation=[CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.75];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect"];
[animation setFillMode:kCAFillModeRemoved];
animation.endProgress=0.99;
[animation setRemovedOnCompletion:NO];
[self.view.layer addAnimation:animation forKey:nil];
}https://stackoverflow.com/questions/14377301
复制相似问题