xcode , iphone animation effect setAnimationPosition
is there any other method other than
[UIView setAnimationPosition:CGPoint(0,0)];
i'm implementing the 'suck effect' but the effect keeps going to the top left hand corner .
i want the effect to be 'sucked' to a specific position .
setAnimationPosition seems like the wa开发者_开发问答y but it isnt working / depreciated?
You can try this.
[UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{CGAffineTransform transform= CGAffineTransformMakeTranslation(170, 20);
[myImage setTransform:transform];
} completion:nil];
If you want to have a better effect add this to the code:
CGAffineTransformMakeScale(myScale, myScale);
and use concat to join both the animations
CGAffineTransformConcat(scaleAnim, transform);
精彩评论