我想把一个UIButton顺时针旋转180度,但它总是逆时针旋转。
这是我的尝试:
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.3];
myButton.transform = CGAffineTransformRotate( myButton.transform, M_PI);
[UIView commitAnimations];
also this:
myButton.transform = CGAffineTransformRotate( myButton.transform, - M_PI);
我做错了什么?