JPWaveAnimation
一句程式碼呼叫的可定製的波浪動畫
- 傳送門:GitHub
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIColor *color0 = [UIColor colorWithRed:255/255.f green:255/255.f blue:255/255.f alpha:0.3f];
UIColor *color1 = [UIColor colorWithRed:255/255.f green:255/255.f blue:255/255.f alpha:0.5f];
UIColor *color2 = [UIColor colorWithRed:255/255.f green:255/255.f blue:255/255.f alpha:0.7f];
JPWaveAnimationView *waveView = [[JPWaveAnimationView alloc] initWithSize:CGSizeMake(200, 100) scaleY:0.7 colorArr:@[color0,color1,color2] scaleHeight:1.1];
waveView.frame = CGRectMake(20, 100, 200, 100);
waveView.backgroundColor = [UIColor purpleColor];
[self.view addSubview:waveView];
self.waveView = waveView;
}
複製程式碼