如何知道iPhone中UIImage的旋转方向

时间:2010-05-24 10:04:09

标签: iphone uiimageview rotation

我想在旋转的方向旋转uiimage,我能够获得touchesBegan和TouchesEnd点之间的角度,但我该如何决定是旋转还是逆时针旋转? Plz帮助

1 个答案:

答案 0 :(得分:0)

获取设备的当前方向并根据需要旋转。

UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
如果设备处于横向状态,

方向 UIDeviceOrientationLandscapeLeft UIDeviceOrientationLandscapeRight