0
我有一個CATransform3D動畫,旨在替換當前在我的應用中使用的Push動畫。目前,它旋轉,就好像X軸位於圖層/視圖的中心一樣。但是,我希望X軸位於屏幕邊緣,以便它翻轉出屏幕。我當前的代碼是: -CATransform3D動畫集X軸
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;
rotationAndPerspectiveTransform.m34 = 1.0/500;
rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, 1.57, 0, 1, 0);
self.view.layer.transform = rotationAndPerspectiveTransform;
[UIView commitAnimations];
我新的核芯顯卡和這樣的,所以任何指針,提示,我要去哪裏錯將不勝感激!
這會導致圖層向下移動到屏幕的右下角。我希望它保持在同一個位置,但它有生氣,就像翻頁一樣。 – Giz
我通過將anchorPoint設置爲0.f,0.f來獲得它的工作。如果您編輯的答案反映了這一點,我很樂意投票。 – Giz