Ale*_*ler 8 iphone image-manipulation uiimageview ripple
我试图在它被触及时在imageView上创建一个类似波纹的效果,但是我不明白如何为Windows实现OpenGL并将其移植到iOS.我试图使用http://www.codeproject.com/KB/openGL/dsaqua.aspx以及cocos2d,但我发现后者完全令人困惑.有人愿意提出一些建议或者能指出我正确的方向吗?
非常感谢!
小智 48
如果您想在视图上产生涟漪效果,可以使用它.
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:2.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect" ];
[myView.layer addAnimation:animation forKey:NULL];
Run Code Online (Sandbox Code Playgroud)
使用下面的iPhone中的涟漪效果
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:(UIViewAnimationTransition) 110 forView:view cache:NO];
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud)
要获得更多效果,您可以查看以下链接:
http://www.iphonedevwiki.net/index.php?title=UIViewAnimationState
小智 7
@Rony在Swift中的CATransition Ripple
let animation = CATransition()
animation.delegate = self
animation.duration = 2
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
animation.type = "rippleEffect"
myView.layer.addAnimation(animation, forKey: nil)
Run Code Online (Sandbox Code Playgroud)
(这是我的第一篇文章,如果我做得对,那就是idk:D)
| 归档时间: |
|
| 查看次数: |
24304 次 |
| 最近记录: |