招呼朋友如何做的UIButton像眨眼我有使用波紋管代碼,但它並不像在我的應用我正在開發的記錄,以便閃爍 我要像那個按鈕的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];
這會降低工作字母鍵使用continuesly NSTimerInteval ..你也可以更改圖像您在每個時間間隔後調用的方法.. – 2012-07-18 10:32:43