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.
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.
I have got the answer, I was calling the animation for the two times and there for it was flickering.
精彩评论