iPhone - having a Ripple effect on a UIImageView

Alex Muller picture Alex Muller · May 12, 2011 · Viewed 26.6k times · Source

I am attempting to create a ripple like effect on an imageView when it is touched down on, however I do not understand how to implement OpenGL for windows and porting it to iOS. I have attempted to use http://www.codeproject.com/KB/openGL/dsaqua.aspx as well as cocos2d however I find the latter completely and utterly confusing. Would anyone be willing to give some suggestions or can point me in the right direction?

Many thanks!

Answer

Rony picture Rony · May 12, 2011

If you want a ripple effect on a view you can use it.

    CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:2.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect" ];
[myView.layer addAnimation:animation forKey:NULL];