views:

92

answers:

1

hello,

i want to rotate the uiimage in the direction turned, i'm able to get the angle between touchesBegan and TouchesEnd points but how should i decide whether to rotate cockwise or anti-clockwise? Plz help

A: 

Get the current orientation of the device and rotates as you wish.

UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];

orientation is UIDeviceOrientationLandscapeLeft and UIDeviceOrientationLandscapeRight if the device is on landscape.

Espuz
no, its not the orientation turn i need. i need to turn the image to the angle rotated, but hw ll i decide, to rotate in left direction or right direction.
suse
Sorry, I don't understand your question. I don't know how you get the angle, how you want to rotate the image (via accelerometer or touching) and what is the problem.
Espuz
i want to turn the imageview without rotating the device.
suse