8

タッチダウンしたときに imageView に波紋のような効果を作成しようとしていますが、Windows 用の OpenGL を実装して iOS に移植する方法がわかりません。http://www.codeproject.com/KB/openGL/dsaqua.aspxと cocos2dを使用しようとしましたが、後者は完全に完全に混乱しています。誰かが提案をしたり、正しい方向に私を向けることができますか?

どうもありがとう!

4

5 に答える 5

48

ビューに波及効果が必要な場合は、それを使用できます。

    CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:2.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect" ];
[myView.layer addAnimation:animation forKey:NULL];
于 2011-05-12T05:37:36.100 に答える
7

iPhoneの波紋効果には以下を使用してください

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:(UIViewAnimationTransition) 110 forView:view cache:NO];
[UIView commitAnimations];

その他の効果については、次のリンクを確認してください。

http://www.iphonedevwiki.net/index.php?title=UIViewAnimationState

于 2011-05-12T05:40:04.327 に答える
6

Swift での @Rony の CATransition リップル

let animation = CATransition()
animation.delegate = self
animation.duration = 2
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
animation.type = "rippleEffect"
myView.layer.addAnimation(animation, forKey: nil)

(これは私の最初の投稿なので、正しく行っているかどうかはわかりません:D)

于 2016-03-04T16:58:44.780 に答える
1

上記のコードを試しましたが、完全に機能するものはありません。以下のソースコードを見つけてください。 https://github.com/willstepp/gl_image_ripple

于 2014-10-27T15:35:31.540 に答える