Tuesday, 10 September 2013

Animation acting crezy

Animation acting crezy

Can someone explain why this animation is running creasy. It works the
first tyme but from then other is scales I think to an incredible size
-(void)enemyAnimation
{
_text.transform = CGAffineTransformIdentity;
CGRect poz = _text.frame;
CGRect outside = poz;
outside.origin.y = self.frame.size.height;
_text.frame = outside;
_text.transform = CGAffineTransformMakeScale(0.001, 0.001);
[UIView animateWithDuration:0.4 delay: 0.0 options: 0
animations:^{_text.frame = poz;
}
completion: ^(BOOL finished){[self enemyAnimation];}];
}
The image (_text) is suposed to come in from the bottom and stop some ware
in the middle(_text has this position set initially, that's why I save the
position in poz), at the same time it's suposed to get back to it's
original scale.
The first time the animation is run it work's great but after that it goes
bananas all i see
is part of the image as if it's scale get's realy huge

No comments:

Post a Comment