你好朋友如何使uibutton像眨眼我有使用波纹管代码,但它不像眨眼
在我的应用程序中,我开发了录音,所以我想要那个按钮
CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
pulseAnimation.duration = .5;
pulseAnimation.toValue = [NSNumber numberWithFloat:1.1];
pulseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
pulseAnimation.autoreverses = YES;
pulseAnimation.repeatCount = FLT_MAX;
[btnBlink.layer addAnimation:pulseAnimation forKey:nil];
最佳答案 或者,您可以通过调用已定义的方法继续使用NSTimerInteval来增加或减少按钮alpha