网格波浪箭头动画

网上有很多波浪的画法,但是往往波浪要与具体需求图形结合,今天我就给大家带来了一个我们股票类App需要显示涨幅和跌幅的两个箭头动画:

网格波浪箭头动画_第1张图片

使用方法很简单:

#import "WaveGridArrowUp.h"
#import "WaveGridArrowDown.h"
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
WaveGridArrowUp *arrowUp = [[WaveGridArrowUp alloc] initWithFrame:CGRectMake(10, 140, 100, 200)];
[arrowUp setPercent:.7]; //control the wave high, 0.0~1.0
[self.view addSubview:arrowUp];
WaveGridArrowDown *arrowDown = [[WaveGridArrowDown alloc] initWithFrame:CGRectMake(120, 140, 100, 200)];
[arrowDown setPercent:.8]; //control the wave high, 0.0~1.0
[self.view addSubview:arrowDown];
}

Github:
https://github.com/yebanhuakai/WaveGridArrow

你可能感兴趣的:(网格波浪箭头动画)