0
我在圖層中添加了CATransform3DMakeRotation
。當我添加另一個刪除舊的?新的CATransform3DMakeRotation刪除舊的轉換?
第一個:
[UIView beginAnimations:@"rotaty" context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];
CGAffineTransform transform = CGAffineTransformMakeRotation(-3.14);
kuvert.transform = CGAffineTransformRotate(transform, DegreesToRadians(134));
kuvert.center = CGPointMake(kuvert.center.x-70, kuvert.center.y+100);
[UIView commitAnimations];
,第二個:
CABasicAnimation *topAnim = [CABasicAnimation animationWithKeyPath:@"transform"];
topAnim.duration=1;
topAnim.repeatCount=0;
topAnim.fromValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(0.0, 0, 0, 0)];
float f = DegreesToRadians(180); // -M_PI/1;
topAnim.toValue=[NSValue valueWithCATransform3D:CATransform3DMakeRotation(f, 0,1, 0)];
topAnim.delegate = self;
topAnim.removedOnCompletion = NO;
topAnim.fillMode = kCAFillModeBoth;
[topAnim setValue:@"flippy" forKey:@"AnimationName"];
[[KuvertLasche layer] addAnimation:topAnim forKey:@"flippy"];
第二個重置視圖和後適用本身。我該如何解決??