CGAffineTransformMakeRotation(90);
How can I send mytextfield.text to CGAffineTransformMakeRotation like : CGAffineTransformMakeRotation(mytextfield.text);
CGAffineTransformMakeRotation(90);
How can I send mytextfield.text to CGAffineTransformMakeRotation like : CGAffineTransformMakeRotation(mytextfield.text);
You just need to convert the string into a number.
CGAffineTransformMakeRotation([mytextfield.text floatValue]);
#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];
}
Thats how I did convert from radians to degrees for CGAffineTransformMakeRotation
For anyones future reference