我正在尝试通过顺时针旋转来为我的图像设置动画,然后缩小。到目前为止,它只是逆时针方向。我已经为沿 Z 旋转的值/键路径尝试了正值和负值,但它没有改变。
[window addSubview:splashView];
[window bringSubviewToFront:splashView];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:2.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)];
splashView.frame = CGRectMake(160, 284, 0, 0);
[splashView.layer setValue:[NSNumber numberWithInt:-360]
forKeyPath:@"transform.rotation.z"];
[UIView commitAnimations];