What is the way to implement custom transformation (+ animation) on a view surface (similar to the images attached) (not
Read this excellent blog post by Bartosz Ciechanowski:
http://ciechanowski.me/blog/2014/05/14/mesh-transforms/
To wrap it up: Apple does this with private API around a class called 'CAMeshTransform'.
The author proposes an self-written substitute:
https://github.com/Ciechan/BCMeshTransformView
It's pretty amazing actually!
You can use this:
- (void)drawWaterRippleAnimation {
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(200, 200, 100, 100)];
view.backgroundColor = [UIColor blueColor];
CATransition *animation=[CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.75];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect"];
[animation setFillMode:kCAFillModeRemoved];
animation.endProgress=1;
[animation setRemovedOnCompletion:NO];
[self.view.layer addAnimation:animation forKey:nil];
}
Credits goes to here.