我需要在iOS应用中实现页面翻转效果。但是效果不应该像UIPageViewController和我检查过的其他一些第三方库那样卷曲页面。页面应该是一个严格的页面作为贺卡的页面,而不是书籍。我必须实现如下图所示的内容。
如果有人能提供任何建议或示例代码我真的很感激。
提前谢谢!!
答案 0 :(得分:3)
答案 1 :(得分:2)
你可以这样做:
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:0.3];
[UIView setAnimationCurve:UIViewAnimationTransitionFlipFromLeft];
[UIView setAnimationTransition:
UIViewAnimationTransitionCurlUp forView:self.view cache:NO];
[UIView commitAnimations];
答案 2 :(得分: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];