我想根据左上角(原点)的值对视图的位置进行动画处理。我都试过了
CGPoint myPosition = CGPointMake(0, 500);
CABasicAnimation *yAnimation = [CABasicAnimation animationWithKeyPath:@"frameOrigin"];
yAnimation.toValue = [NSValue valueWithCGPoint:myPosition];
和
CGPoint myPosition = CGPointMake(0, 500);
CABasicAnimation *yAnimation = [CABasicAnimation animationWithKeyPath:@"origin"];
yAnimation.toValue = [NSValue valueWithCGPoint:myPosition];
没有任何效果。如何正确设置此属性的动画?