[英]Paper folding animation in iPhone
我正在開發一個兒童應用程序,用戶應該能夠像物理紙一樣折疊紙質圖像,並能夠將其切割成他喜歡的任何形狀。如何為 iPhone/iPad 獲得折紙 animation?任何人都可以建議我完成這項任務的方法。 您將從這里了解我的應用程序
參考這段代碼:
[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];
嘗試這個:
[UIView transitionWithView:urImage
duration:1.5
options: UIViewAnimationOptionTransitionCurlUp
animations^{
urImage.frame = requiredFrame;
}
completion:^(BOOL finished){
//[urImage removeFromSuperview];
// do something after animation has completed
}
];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.