Ok the title might be vague but here is what I want to do.
My application has two wheels. User can rotate the outer wheel to match values in the inner wheel and thus displaying certain results according to the selected value.
Now I can rotate the image fine by setting the transform property. But once transformed, how would I know what is selected on the outer wheel??
One way would be to get the transform property and manipulate it.
But HOW???
I would not rotate the image itself but the layer of the imageview. You can then always access the transform property of the layer of the imageview containing your image.
Ok, here is some code. First you have to get the layer of the uiimageview
CALayer* layer = [self.layer presentationLayer];
Then you can read the whatever rotation you need from the layers keypath like this.
float rotationAngle = [[layer valueForKeyPath:@"transform.rotation.z"] floatValue];
Let me know if this doesn't help. There is also an other way to obtain the rotation angle. But it is a bit more complex ;)