CATransition 从顶部卷曲页面
我想知道是否有人使用 CATRANSITION 从顶部管理卷页。我有以下内容:
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"];
但不幸的是,它总是从底部卷曲页面。如果有人能告诉我如何从顶部进行卷页,我将非常感激。
非常感谢。
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.
Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我已经做到了这一点。您需要设置animation.type = @"pageUnCurl"; ——谁会想到!谢谢苹果。
I've got this working. You need to set animation.type = @"pageUnCurl"; - who would have thought! Thanks apple.
找到答案了,需要将子类型设置为从右开始!
Found the answer, need to set subtype to from right!
如果你想要卷曲页面的完整动画,你也可以删除animation.endProgress。
=)
you can also remove the animation.endProgress if you want a total animation of curl page .
=)