In my SwiftUI app, I have an Image:
I added this image using:
Image("shoe_test")
.resizable()
.frame(width: 275, height: 275)
.rotationEffect(Angle(degrees: 30))
However, I would like to flip this image in the opposite direction, like:
For this, I haven’t tried anything, but I had no luck with rotationEffect, and I can’t get my head over this, Any help is greatly appreciated,
>Solution :
You could use
.rotation3DEffect(.degrees(180), axis: (x: 0, y: 1, z: 0))
With the rotation3DEffect you can rotate your image in all 3 Dimensions.
- rotating along the
xaxis will flip the image top/bottom - rotating along the
yaxis will mirror it right/left - rotating along the
zaxis will flip and mirror it.

