後沒有收到觸摸我的情況: 我有一個UIButton
,它的與被聲明爲上UIView
一個類別CAKeyframeAnimation
動畫:的UIButton CAKeyframeAnimation
CAKeyframeAnimation * scale = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale"];
scale.duration = duration;
scale.beginTime = delay;
scale.fillMode = kCAFillModeForwards;
NSMutableArray * times = [[NSMutableArray alloc] init];
scale.values = values;
scale.timingFunctions = times;
CAAnimationGroup * group = [CAAnimationGroup animation];
[group setDelegate:self];
[group setDuration:duration + delay];
[group setFillMode:kCAFillModeForwards];
[group setRemovedOnCompletion:NO];
[group setAnimations:[NSArray arrayWithObject:scale]];
[self.layer addAnimation:group forKey:@"scale"];
的問題是,動畫之後,按鈕不會觸摸。如果我刪除動畫一切正常。 有誰知道我在做什麼錯?
感謝
很高興看到這篇文章:) –