If you just want to determine if the image has been rotated using the affine transform, you think you can do this:
if (CGAffineTransformIsIdentity(photoView.transform)) { // not rotated ... } else { // rotated ... }
If you want to check for a specific rotation, do the following:
CGAffineTransform t = CGAffineTransformMakeRotation(M_PI); if (CGAffineTransformEqualToTransform(photoView.transform, t)) {
Note that the above two solutions only work if you do not apply OTHER affine transforms to the representation at the same time as the rotation transforms. If you also apply other transformations, perhaps you better just keep track of the state of rotation in the variable.
Mathew
source share