Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ripple effect" on UIImageView

I am now trying to make Ripple Animation with code Below by this code i getting animation at same location every time

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

but i want to get animation on touch point on imageview mean animation will occur at that point where user will tap on UIImageView

like image 294
Vishal Avatar asked Jan 22 '26 07:01

Vishal


1 Answers

I think below code can help you.

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

You can also better visit this post which is similar to your post.

like image 118
BornCoder Avatar answered Jan 23 '26 19:01

BornCoder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!