I want to animate my photo gallery like the pages of the book. Is there any method with that I can use UIanimationtransitioncurl in either the left or right side?
Th
Yes, you can. This is the code I use for that,
self.containerViewParent = [[[UIView alloc] initWithFrame:CGRectMake(what ever you want)] autorelease]; //Create a container parent for the container view.
self.containerView = [[[UIView alloc] initWithFrame:GRectMake(what ever you want)] autorelease]; //Create a container view for the view you wish to display.
CGAffineTransform rotate = CGAffineTransformMakeRotation(-3.14/2);
[containerViewParent setTransform:rotate]; //Rotate the containerViewParent.
[self.view addSubview:containerViewParent];//Add it to the main view.
rotate = CGAffineTransformMakeRotation(3.14/2);
[containerView setTransform:rotate];//Rotate the containerView.
[self.containerViewParent addSubview:containerView]; //Add it to the self.containerViewParent.
[self.containerView addSubview:viewToDisplay]; //Add the view you want to display.
And then apply the transition to the parent view,
[UIView beginAnimations:@"page transition" context:nil];
[UIView setAnimationDuration:2.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.containerView cache:YES];
[UIView commitAnimations];
It will curl to the left or the right when you curl up and down.
**Note that you will need to play with the offset of the views to make it display correctly, but it works great for me.