views:

253

answers:

0

Hi

I have this code inside an animation block, but when the code is executed, I can still see the UIImageView moving on the screen. Is there anything I have done wrong or the CATransaction setDisableActions does not work inside an UIView animation block?

[UIView beginAnimations:@"An animation" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationRepeatCount:aNumber];

if (aCondition) {
[CATransaction begin];
[CATransaction setDisableActions:YES];
anImageView.frame = CGRectMake(x, y, width, height);
[CATransaction commit];
}
..... some other codes
..... some other codes

[UIView commitAnimations];

Any help is appreciated!

Thanks,
aobs