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

使用方法很简单:
#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];
}