I am having some problems getting this animation to execute. I have a feeling there are probably a few problems with it, but am having trouble finding the right direction. I would like to pulse (scale up and down) a CATextLayer while the user is dragging a UISlider control.
在“国际行动”方法之外,我有以下法典。 我已进行了检查,以确保实际使用这种方法。
CABasicAnimation *pulse = [CABasicAnimation animationWithKeyPath:@"scale"];
pulse.fromValue = [NSNumber numberWithFloat:1.0];
pulse.toValue = [NSNumber numberWithFloat:1.2];
pulse.duration = 1;
pulse.repeatCount = HUGE_VALF;
pulse.autoreverses = YES;
pulse.timingFunction =[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[self.symbolLayer addAnimation:pulse forKey:nil];
我已经注意到,这一方法一再被称作非常快,但并不确定这是否阻止了im的发生,或者存在 block灭本身的问题。