用OC原生的贝塞尔曲线来实现该效果,下面直接上代码:
- (void)showWatterRippleAnimation {
btnWatter = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 120, 120)];
btnWatter.layer.cornerRadius = 60.f;
btnWatter.center = self.view.center;
btnWatter.layer.borderColor = [UIColor darkGrayColor].CGColor;
btnWatter.layer.borderWidth = 1;
btnWatter.backgroundColor = [UIColor lightGrayColor];
[self.view addSubview:btnWatter];
[self addAnimationView];
//如果要实现图2效果,则打开此代码
// _animationTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(addAnimationView) userInfo:nil repe