【问题标题】:How to do Animation like BooK front cover in iOS?如何在 iOS 中制作类似于 Book 封面的动画?
【发布时间】:2013-09-13 05:51:24
【问题描述】:

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

请看this link,正是我想要的。

【问题讨论】:

  • 更新:-请帮助我实现上面给出的链接中的动画。在那个链接中,对于我已经完成的内页,对于书籍封面(正面和背面动画)我需要做。

标签: ios animation page-curl


【解决方案1】:

检查一下:

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

浏览为代码参考提供的视频。

我猜这就是你要找的。​​p>

【讨论】:

  • 实际上我已经实现了 UIpageViewcontroller,现在我想将 Cover 添加到 that.so 这就是我正在寻找的。​​span>
  • 然后将这两个动画分开。第一页(封面页)使用翻转变换,另一页使用 UIPageViewController。
  • 请检查我的答案。我做到了。
【解决方案2】:

使用这段代码,经过长时间的工作,我解决了这个任务,感觉很开心:) 更新:

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

【讨论】:

  • 是的,对于动画部分。旋转视图是专辑封面,只有从左到右翻转,这是我想要的。
  • 我知道这是一篇旧文章,但请问您是如何使用 UIPageViewController 实现的?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多