Curtain Opening: Animation with Active Animation

I would like to revive the curtain that opens. I have two images: one for the left and one for the right side of the curtain (shown in red). I would like to smooth them out with Core Animation. What type of animation should I search for? How to achieve a realistic sliding style?

Hi,

Stephen

alt text http://img.skitch.com/20100627-8ytxrbe64ccbruj49c2pbs7kt2.png

+5
source share
3 answers

I'm not sure why people suggest using translation. If all you have to do is copy the images, just call -setCenter on each image in the animation block. Like this:

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[leftCurtainImageView setCenter:pointOffScreenLeft];
[rightCurtainImageView setCenter:pointOffScreenRight];
[UIView commitAnimations];

pointOffScreenLeft pointOffScreenRight :

CGPoint pointOffScreenLeft = CGPointMake(
                 -[leftCurtainImageView bounds].size.width, 
                 [leftCurtainImageView frame].origin.y);

CGPoint pointOffScreenRight = CGPointMake(
                 [rightCurtainImageView frame].origin.x + 
                 [rightCurtainImageView bounds].size.width, 
                 [leftCurtainImageView frame].origin.y);

, .

+5

- CGLayers, CGAffineTransformTranslate , .

+1

The man

After a long search. The only way I could find is this.

https://github.com/Ciechan/BCMeshTransformView

0
source

All Articles