I have a weird issue with swift. I am trying to flip two views, not the whole screen but it flips the whole screen.
It has been asked before on here but no answer:
flip animation in swift flips whole view not subviews
This is the references to the views I have (I have confirmed they only take up part of the screen):
@IBOutlet var frontview: UIView!
@IBOutlet var backview: UIView!
And this is my code for flipping:
func flipCard() {
if (showingBack) {
UIView.transitionFromView(backview, toView: frontview, duration: 1, options: UIViewAnimationOptions.TransitionFlipFromRight, completion: nil)
showingBack = false
} else {
UIView.transitionFromView(frontview, toView: backview, duration: 1, options: UIViewAnimationOptions.TransitionFlipFromLeft, completion: nil)
showingBack = true
}
}
Thanks for your help