CGAffineTransformMakeRotation(90);
如何将mytextfield.text发送到CGAffineTransformMakeRotation 喜欢:CGAffineTransformMakeRotation(mytextfield.text);
答案 0 :(得分:1)
您只需将字符串转换为数字即可。
CGAffineTransformMakeRotation([mytextfield.text floatValue]);
答案 1 :(得分:1)
#define DEGREES_TO_RADIANS(__ANGLE__) ((__ANGLE__) / 180.0 * M_PI)
-(IBAction)RotateButtonPressed:(id)sender;
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.5];
arrow.center = CGPointMake(151.0,80.0);
arrow.transform = CGAffineTransformMakeRotation(DEGREES_TO_RADIANS([degrees.text floatValue]));
[UIView commitAnimations];
}
这就是我如何将弧度从弧度转换为CGAffineTransformMakeRotation的度数
任何人未来的参考