开发者

Flickering while moving an image from right to left

I am moving an image from right to left by changing the imageView center. I am using a NSTimer to trigger the event of changing the center. Everything is working fine except that the image movement is not开发者_开发技巧 smooth and is flickering. Kindly help.


hm,... but you do use the QuartzCore Framework to animate the movement don't you? Like in

#import <QuartzCore/QuartzCore.h>

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3]; // animation duration in seconds
image.center = view.center;
[UIView commitAnimations];

Don't you? Oh and make sure that you're on the main-thread. GUI-Handling on other Threads can produce stuff you don't want ;)


        Try this code animation flip right to left its definitely help u.

        #import <QuartzCore/QuartzCore.h>

        [UIView beginAnimations:nil context:nil];
        [UIView setAnimationCurve:UIViewAnimationTransitionFlipFromRight];
        [UIView setAnimationDuration:0.3]; // animation duration in seconds
        image.center = view.center;
        [UIView commitAnimations];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜