Skip to content

qiubaiying/WaterRippleView

Repository files navigation

WaterRippleView

水波纹动画视图

Overview

Setting

Usage

// 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];

Note

若在 Cell 中复用 WaterRippleView 必须先调用 stopAnimation清除原先的动画图层,否则动画图层会叠加。

[self.waterView stopAnimation];
[self.waterView startAnimation];

License

This project is under MIT License. See LICENSE file for more information.

About

水波纹动画视图

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published