Search code examples
iphoneiphone-sdk-3.0animationcore-animationipad

iPad: Image Animation , Image Flickering problem


I am making an iPad application. In that for moving image from left to right and vice-a-versa. I am using following code for making the animation

animation = [CATransition animation];

[animation setDelegate:self];
[animation setDuration:AnimationDuration];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromRight];

[[ImgMainPhoto layer] addAnimation:animation forKey:@"animate"]; 

but in this animation when I move the image on the touchmoved function , the image will be moved, but shows some Flickering.

Can any one suggest me what changes I need to put in my code.

thanks in advance.


Solution

  • I have got the answer, I was calling the animation for the two times and there for it was flickering.