本の表紙を開いたり閉じたりするアニメーションをiosで実行する方法を理解しようとしています。Google 検索結果は次のとおりです。
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 がどのように機能するかを理解するのは難しいと感じています。あなたが遭遇した指示やリソースがあれば、私に知らせてください. 私の主な動機は、アクションを逆転させる方法を見つけることです (本の表紙を閉じます)。コードを変更しようとしましたが、うまくいきませんでした。前もって感謝します。