0

I want the Page flip animation for Photo Album Book cover even though I have added animation for pages (Used UIpageViewController) but need to have main page animation as well.

Please see this link, exactly like this I want.

halfer
  • 19,824
  • 17
  • 99
  • 186
Sanoj Kashyap
  • 5,020
  • 4
  • 49
  • 75
  • update:-Please help me to achieve the animation like in above given link.In that link, For inner pages i have done, for book cover(front and back animation) i need to do. – Sanoj Kashyap Sep 24 '13 at 20:38

2 Answers2

3

Check this :

http://code4app.net/ios/Flip-Transform-View/4f75aa156803faa60f000000

Go through the video given for the code reference.

I guess this is what you are looking for.

Mrunal
  • 13,982
  • 6
  • 52
  • 96
1

Use this code , after long hours work I solved this task , feeling happy :) Updated:

[UIView setAnimationDelegate:self];
[UIView commitAnimations];
CATransform3D initialTransform = ges.view.layer.transform;
initialTransform.m34 = 1.0 / -1100;
layer.transform = initialTransform;
layer.anchorPoint = CGPointMake(-0.0, 0.5);
NSLog(@"%f %f",layer.frame.origin.x,layer.frame.origin.y);
[UIView beginAnimations:@"Scale" context:nil];
[UIView setAnimationDuration:3];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
CATransform3D rotationAndPerspectiveTransform = ges.view.layer.transform;
rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, M_PI , 0 , -ges.view.bounds.size.height/2, 0);
layer.transform = rotationAndPerspectiveTransform;
[UIView setAnimationDelegate:self];
[UIView commitAnimations];

[UIView setAnimationDelegate:self];
[UIView commitAnimations];
Sanoj Kashyap
  • 5,020
  • 4
  • 49
  • 75