This is a SwiftUI example of how to flip a card from the front to the back.
Very straight forward. Just replace the images with your own images and watch it work.
The key is to rotate the image to 90 degrees.
Once it's perpendicular to the screen the image is no longer visible and then the other image is rotated back to zero degrees.