I had the same problem for a while. The UIImageOrientation documentation seems to describe what happens with a vertical image if you apply the specified orientation. For example, if you take a vertical image and apply a UIImageOrientationLeft, it will rotate 90 ° counterclockwise.
The exif documentation, on the other hand, describes what the orientation of the image data is for creating a vertical image. Therefore, for the EXIF 8 code, the image data must be rotated 90 ° clockwise to display a vertical image.
It turns out that this problem has only UIImageOrientationLeft and UIImageOrientationRight, since everything else comes out the same way you look at it.
source share