水波纹动画视图
// init
self.waterRippleView = [[WaterRippleView alloc] init];
self.waterRippleView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height/2);
[self.view addSubview:self.waterRippleView];
self.waterRippleView.progress = 0.23;
self.waterRippleView.amplitude = 14;
self.waterRippleView.cycle = 2.5;
self.waterRippleView.speed = 5;
self.waterRippleView.moveDirection = YES;
[self.waterRippleView startAnimation];
若在 Cell 中复用 WaterRippleView
必须先调用 stopAnimation
清除原先的动画图层,否则动画图层会叠加。
[self.waterView stopAnimation];
[self.waterView startAnimation];
This project is under MIT License. See LICENSE file for more information.