views:

18

answers:

2

hi all,

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.

+1  A: 

You don't need to use a transition for what it sounds like you're trying to do. You can instead just animate the view's center or the layer's position. Take a look at the answer I gave here. In your case, you may not want to repeat the animation, but you can just remove that line. If you need clarification, just update your answer above and then let me know by posting a comment to my answer here.

Best regards.

Matt Long
thanks for your reply....
iPhone Fun
A: 

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

iPhone Fun