开发者

Paper folding animation in iPhone

I am working on a kids application where the user should be able to f开发者_高级运维old a paper image like a physical paper and be able to cut it to which ever shape he likes.How to get paper folding animation for iPhone/iPad?Can any one please suggest me a way to achieve this task. You will get an idea about my app from this


Refer This code:

[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];


Try this:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜