iPhone中的纸张折叠动画

时间:2011-05-04 06:15:00

标签: iphone animation

我正在开发一个儿童应用程序,用户应该能够像实物纸一样折叠纸质图像,并能够将其剪切成他喜欢的形状。如何获得iPhone / iPad的纸质折叠动画?可以任何人请建议我实现这一任务的方法。 您将从this

了解我的应用

2 个答案:

答案 0 :(得分:1)

参考此代码:

[UIView beginAnimations:nil context:nil];
    [UIView setAnimationCurve:UIViewAnimationOptionTransitionCurlUp];
    [UIView setAnimationDuration:2];
    [UIView commitAnimations];
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationCurve:UIViewAnimationOptionTransitionCurlDown];
    [UIView setAnimationDuration:2];
    [UIView commitAnimations];

答案 1 :(得分:0)

试试这个:

[UIView transitionWithView:urImage 
        duration:1.5 
        options: UIViewAnimationOptionTransitionCurlUp 
        animations^{
            urImage.frame = requiredFrame;
        } 
        completion:^(BOOL finished){
            //[urImage removeFromSuperview];
            // do something after animation has completed
        }
];
相关问题