怎么做iOS中的BooK封面动画?

即使我为页面添加了动画(使用过的UIpageViewController),我也想要用于相册书籍封面的页面翻转动画,但也需要有主页面动画。

请看这个链接 ,就像我想要的那样。

检查一下:

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

浏览为代码参考提供的video。

我猜这就是你要找的东西。

使用此代码,经过长时间的工作我解决了这个任务,感到高兴:)更新:

[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];