Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BoxerRobban472

macrumors member
Original poster
Sep 12, 2013
66
1
Gothenburg, Sweden
Hi everyone!

I'm quite new to iOS development and don't really know a whole bunch about it. However, I stumbled upon an app which lets you create a ripple effect on a picture of your choice, like the picture was the "water" and you could interact with it. (This is the app: https://itunes.apple.com/us/app/ripple-image/id591785636?mt=8 ), and I'm just curious; How would you go about to create something like this? I have tried googling and am really drawing a blank when it comes to model it programmatically, do you guys have any ideas?

Thank you!

Kind regards,
Johan
 
A long time ago, you could access it through a CATransition...

Edit: I looked it up and it's not necessarily documented but it's not necessarily private.

Code:
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:2.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect" ];
[myView.layer addAnimation:animation forKey:NULL];
 
  • Like
Reactions: BoxerRobban472
A long time ago, you could access it through a CATransition...

Edit: I looked it up and it's not necessarily documented but it's not necessarily private.

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

Wow! Thank you for sharing, now I know what I'm going to be doing this weekend!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.