2
我想不通为什么这个代码:CATransaction是立竿见影的,而忽略过渡时间
CALayer *viewLayer = [aView layer];
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:10.0f]
forKey:kCATransactionAnimationDuration];
viewLayer.position = CGPointMake(200.0f, 200.0f);
viewLayer.position = CGPointMake(320.0f, 480.0f);
[CATransaction commit];
移动视图,但动作不动画(运动是即时的)。 aView是UIView内的UIImageView。