UIView/UIViewController右上角的页面卷曲
问题描述:
我正在寻找做一个部分页面卷曲(但将解决整页卷曲),在右上角开始。UIView/UIViewController右上角的页面卷曲
我已经设法成功地做到这一点使用:
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.0];
CAMediaTimingFunction *fun=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[animation setTimingFunction:fun];
animation.type = @"pageCurl";
[email protected]"fromRight";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.75;
[animation setRemovedOnCompletion:NO];
[[bckground layer] addAnimation:animation forKey:@"pageCurlAnimation"];
但因为这使用私有API - 提交我的应用程序的时候,我不能冒着被拒绝。
任何人都知道我可以从右上角工作UIViewAnimationOptionTransitionCurlUp
或UIModalTransitionStylePartialCurl
?
答
代码中没有私有API。我已经成功提交到appstore的应用程序中具有相同的代码。
私有API意味着使用未记录的方法。未记录的字符串值是okey。
此外,您可以将'subtype'更改为常量'kCATransitionFromRight'。 – Sulthan 2013-04-22 08:07:55