I try to make the UIViewAnimationTransitionCurlUp work horizontally so, I rotate the view where the animation is applied. But the didn't work, the animation stay from the bottom to the top. Any idea?
first = [[PDFPortraitView alloc] initWithFrame:CGRectMake(0, 0, 960, 768) andCurrentPage:currentPage]; container = [[UIView alloc] initWithFrame:CGRectMake(-96, 140, 960, 768)]; container.backgroundColor = [UIColor redColor]; container.transform = CGAffineTransformMakeRotation(M_PI * (0.5)); [self.view addSubview:container]; [container addSubview:first]; second = [[PDFPortraitView alloc] initWithFrame:CGRectMake(0, 0, 960, 768) andCurrentPage:currentPage]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.5f]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:container cache:NO]; [first removeFromSuperview]; [container addSubview:second]; [UIView commitAnimations];
Try applying a 90 degree rotation to your view's superview's transform. That should transform your view's coordinate space, so a curl transition applied to the child view should curl in rotated coordinates.
You might have to create multiple views to keep your content from being rotated:
outer view, rotated 90 degrees.
middle view - this is the view that gets the curl transition
inner view, rotated -90 degrees, and containing your actual content.
I haven't tried it, but that should work.
Note that the view you switch to will have to be a middle view/inner view combo.