如何做动画像iOS中当书本封面? [英] How to do Animation like BooK front cover in iOS?

查看:216
本文介绍了如何做动画像iOS中当书本封面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想,即使我已经添加动画页面(二手UIpageViewController),但需要有主网页动画以及用于照片Allbum书的翻页动画覆盖。
请参阅此链接正是这样想
看到这个

I want the Page flip animation for Photo Allbum 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 see this

1
请帮助。

1: Please help.

推荐答案

使用此code,经过长时间的工作我解决了这个任务,感到快乐:)
更新:

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

这篇关于如何做动画像iOS中当书本封面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆