Why can I not add a animation to a UIImageView?

Posted by Flocked on Stack Overflow See other posts from Stack Overflow or by Flocked
Published on 2010-03-31T03:40:37Z Indexed on 2010/03/31 3:53 UTC
Read the original article Hit count: 377

Filed under:
|
|

Hello, Im trying to add a animation to a UIImageView, but it always fails. Why? Here is the code:

        //(…)
        UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();    
        animationImage = [[UIImageView alloc]initWithImage:newImage];
        [self.view addSubview:animationImage];

        CATransition *animation = [CATransition animation];
        [animation setDelegate:self];
        [animation setDuration:0.35];
        [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
        animation.type = @"pageCurl";
        animation.fillMode = kCAFillModeForwards;
        animation.endProgress = 0.58;
        [animation setRemovedOnCompletion:NO];
        [[animationImage layer] addAnimation:animation forKey:@"pageCurlAnimation"];

© Stack Overflow or respective owner

Related posts about catransition

Related posts about iphone