0
我需要在180度的x軸上旋轉我的視圖。旋轉完成,但當它開始旋轉時,它會摺疊我的半視圖。這是我所做的任何幫助的代碼。CABasicAnimation在x軸上旋轉視圖
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.x"];
rotationAnimation.fromValue = [NSNumber numberWithFloat:0];
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0];
rotationAnimation.duration = 2.0;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = 0;
[_view_topShowDate.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
您可以發佈摺疊視圖的圖像嗎? – shallowThought
[使用CABasicAnimation多次旋轉UIImageView]的可能重複(http://stackoverflow.com/questions/17426802/using-cabasicanimation-to-rotate-a-uiimageview-more-than-once) –