1
我想了解如何讓打開和關閉動畫進入ios的書櫥。谷歌搜索結果如下:bookcover翻轉動畫ios
coverimage.layer.anchorPoint=CGPointMake(0, .5);
coverimage.center = CGPointMake(coverimage.center.x - coverimage.bounds.size.width/2.0f, coverimage.center.y);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationDelay:0.1];
coverimage.transform = CGAffineTransformMakeTranslation(0,0);
CATransform3D _3Dt = CATransform3DIdentity;
_3Dt = CATransform3DMakeRotation(3.141f/2.0f,0.0f,-1.0f,0.0f);
_3Dt.m34 = 0.001f;
_3Dt.m14 = -0.0015f;
coverimage.layer.transform =_3Dt;
[UIView commitAnimations];
它工作的很好,但我發現很難理解它如何做CATransform3DMakeRotation。如果您遇到任何方向或資源,請告訴我。我的主要動機是找到一種方法,使其反轉行動(關閉書的封面)。我試圖改變代碼,但沒有奏效。提前致謝。
非常感謝您AppleDelegate,也如果任何人有興趣瞭解有很好的文章在這裏:[鏈接] HTTP ://markpospesel.wordpress.com/2012/05/23/anatomy-of-a-page-flip-animation/ – snowflakes74