【问题标题】:Page curl on top right corner of UIView / UIViewControllerUIView / UIViewController 右上角的页面卷曲
【发布时间】:2013-04-21 21:26:27
【问题描述】:

我正在寻找从右上角开始的部分卷曲(但会满足于整页卷曲)。

我已经成功地做到了这一点:

CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.0];
CAMediaTimingFunction *fun=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[animation setTimingFunction:fun];
animation.type = @"pageCurl";
animation.subtype=@"fromRight";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.75;
[animation setRemovedOnCompletion:NO];
[[bckground layer] addAnimation:animation forKey:@"pageCurlAnimation"];

但由于这使用了私有 API - 我在提交我的应用程序时不会冒被拒绝的风险。

任何人都知道我如何从右上角获得UIViewAnimationOptionTransitionCurlUpUIModalTransitionStylePartialCurl 工作?

【问题讨论】:

  • 另外,您可以将subtype 更改为常量kCATransitionFromRight

标签: ios animation uiview uiviewcontroller page-curl


【解决方案1】:

您的代码中没有私有 API。我在成功提交到应用商店的应用中有相同的代码。

私有 API 意味着使用未记录的方法。未记录的字符串值是好的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-24
    相关资源
    最近更新 更多