本文介绍了CATransition页面从顶部卷曲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有人使用CATRANSITION从顶部管理页面卷。我有以下内容:
I wanted to know if anyone managed a pagecurl from the top using the CATRANSITION. I have the following :
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:0.35];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageCurl";
animation.subtype = kCATransitionFromTop;
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.30;
[animation setRemovedOnCompletion:NO];
[self.view.layer addAnimation:animation forKey:@"pageCurlAnimation"];
但不幸的是,它总是从底部卷曲页面。如果有人能告诉我如何从顶部进行页面卷曲,我将非常感激。
but unfortunately, it always does the page curl from the bottom. I will be very grateful if anyone can tell me how to do a page curl from the top.
非常感谢。
推荐答案
subtype = KCATransitionFromLeft or KCATransitionFromRight
如果你想要一个卷曲页面的总动画,你也可以删除animation.endProgress。
=)
you can also remove the animation.endProgress if you want a total animation of curl page .=)
这篇关于CATransition页面从顶部卷曲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!