iPhone:如何在没有卷曲效果的情况下实现翻页效果?

9
我需要在iOS应用程序中实现翻页效果。但是,效果不应像UIPageViewController和我检查过的一些其他第三方库那样将页面卷起来。该页面应该是刚性的,因为它是贺卡的页面而不是书籍。我必须实现如下图所示的内容。 enter image description here 如果有人能提供任何建议或示例代码,我将非常感激。
谢谢您的帮助!

1
你应该查看 http://markpospesel.wordpress.com/tag/catransform3d/ 获取更多信息。 - Michaël Azevedo
你能告诉我你在哪个应用程序中看到这个动画的名称吗? - Leena
@Leena 目前还没有在应用商店上架。我正在努力开发中。 - Bharat Jagtap
@Micazeve和Sharon Nathaniel,感谢提供的链接。我查看了这些链接,但无法弄清楚如何根据我的需求修改这些库。它们都是从页面中心折叠页面。但在我的情况下,它必须只是从页面左边缘翻转一页。实际上,这是一个简单的两页贺卡。 - Bharat Jagtap
你需要查看Core Foundation如何进行3D变换。这篇帖子的答案包含了你所需的所有链接。https://dev59.com/iG455IYBdhLWcg3wCPjh - Dev2rights
2个回答

2
你可以这样做:
[UIView beginAnimations:@"View Flip" context:nil]; 
[UIView setAnimationDuration:0.3];
[UIView setAnimationCurve:UIViewAnimationTransitionFlipFromLeft];
[UIView setAnimationTransition:
UIViewAnimationTransitionCurlUp forView:self.view cache:NO];
[UIView commitAnimations];

1
这对你会有帮助。
-(void) animateMe:(UIViewAnimationTransition)style
{
   [self playCardSound];
   [UIView beginAnimations:@"flipview" context:nil];
   [UIView setAnimationDuration:0.5];
   [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
   [UIView setAnimationTransition: style forView:self.view cache:YES];
   [UIView commitAnimations];
}

像这样调用:

[self animateMe:UIViewAnimationTransitionFlipFromLeft];
[self animateMe:UIViewAnimationTransitionFlipFromRight];

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接