水波纹动画视图
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
WaterRippleView
WaterRippleView_demo.xcodeproj
WaterRippleView_demo
.gitignore
LICENSE
README.md

README.md

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.