iOS 上的页面卷曲 [英] Page Curl on iOS
本文介绍了iOS 上的页面卷曲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我四处寻找类似的帖子,但没有找到解决方案.我正在寻找一个简单的翻页动画(没有手指跟踪),如下所示:http://www.youtube.com/watch?v=_vOYvaNhSHw
I look around for similar posts but didn't find a solution. I'm looking for a simple page turn animation (without finger tracking) like this: http://www.youtube.com/watch?v=_vOYvaNhSHw
是否可以创建或许可它?
Is it possible to create or license it?
非常感谢您的帮助.
推荐答案
这段代码可以解决问题:
This fragment of code do the trick:
[UIView beginAnimations:@"Flip" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.base.view cache:YES];
[user.view removeFromSuperview];
[base.view addSubview:home.view];
[UIView commitAnimations];
在这个例子中,删除了user"视图控制器,并添加了home"视图控制器,带有类似翻页的过渡
In this example the "user" viewcontroller is removed, and the "home" viewcontroller is added, with a pageflip like transition
这篇关于iOS 上的页面卷曲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文