I am trying to make an arrow spin using CGAffineTransformMakeRotation and it works if I hard code a number, but when i try passing it a variable, it gives the error: "error: incompatible type for argument 1 of 'CGAffineTransformMakeRotation'". I thought the data type it took was CGFloat but that doesn't work. How do I fix this?
Code:
CGFloat *angle = random() % 100;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[arrow setTransform:CGAffineTransformMakeRotation (angle)];
[UIView commitAnimations];