hy
我想做一个小动画。如果图像是静态的,旋转效果很好。但是当我移动我的图像视图时,它会拉伸图像。如果不旋转图像,则可以移动图像而不会出现问题。
-(void)play
{
CGRect ship=image.frame;
ship.origin.x=ship.origin.x+move;
ship.origin.y=ship.origin.y+move2;
image.frame=ship;
}
-(void)rotate
{
int degre=180;
float radian=degre*(3.14/180);
image.transform =CGAffineTransformMakeRotation(radian);
}