1

除了

[UIView setAnimationPosition:CGPoint(0,0)];

我正在实现“吸吮效果”,但效果一直在左上角。

我希望效果被“吸”到特定位置。

setAnimationPosition 似乎是这样,但它不工作/折旧?

4

1 回答 1

0

你可以试试这个。

[UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{CGAffineTransform transform= CGAffineTransformMakeTranslation(170, 20);
        [myImage setTransform:transform];
    } completion:nil];

如果您想获得更好的效果,请将其添加到代码中:

 CGAffineTransformMakeScale(myScale, myScale);

并使用 concat 加入两个动画

CGAffineTransformConcat(scaleAnim, transform);
于 2013-09-27T07:20:55.217 回答