我想3D在U軸上動畫UIImageView,因此它會做180度旋轉。在90 degres我想改變圖像。 (這就是爲什麼我在2)「打破」了動畫。與3D動畫ios問題
動畫效果很好,但問題在於第二張圖像是上下顛倒的。任何想法我應該怎麼做的圖像被繪製正常?
這裏是我的代碼
i++;
[UIView animateWithDuration:2 animations:^{
self.imageView.layer.transform = CATransform3DMakeRotation(-M_PI/2 , 1, 0,0);
} completion:^(BOOL finished){
UIImage *bottomI = (UIImage *)[bottom objectAtIndex:i];
self.second.image =bottomI;
[UIView animateWithDuration:2 animations:^{
imageView.layer.transform = CATransform3DMakeRotation(M_PI , 1, 0,0);
} completion:^(BOOL finised){
}];
}];
你不能在UIImage上做CGAffineTransformMakeRotation – user1078065