Is CABasicAnimation's toValue relative to initial position?
问题 I have a CALayer that I'm explicitly animating to a new position. My toValue property seems only relative to the layer's initial position. CABasicAnimation *move = [CABasicAnimation animationWithKeyPath:@"position"]; move.fromValue = [NSValue valueWithCGPoint:CGPointMake(blueDot.position.x, blueDot.position.y)]; move.toValue = [NSValue valueWithCGPoint:CGPointMake(self.view.center.x, self.view.center.y)]; move.duration = 1.0; [blueDot addAnimation:move forKey:@"myMoveAnimation"]; blueDot