我需要在iOS应用程序中实现翻页效果。但是,效果不应像UIPageViewController和我检查过的一些其他第三方库那样将页面卷起来。该页面应该是刚性的,因为它是贺卡的页面而不是书籍。我必须实现如下图所示的内容。
如果有人能提供任何建议或示例代码,我将非常感激。
谢谢您的帮助!
谢谢您的帮助!
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:0.3];
[UIView setAnimationCurve:UIViewAnimationTransitionFlipFromLeft];
[UIView setAnimationTransition:
UIViewAnimationTransitionCurlUp forView:self.view cache:NO];
[UIView commitAnimations];
-(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];