Flip animation in fast flips

I need to switch between the two subzones because I use flip animation, but it flips the entire screen, not the subview. Here is the code I used to translate:

UIView.transitionFromView(frontView, toView: backView, duration: 1, options: UIViewAnimationOptions.TransitionFlipFromRight | UIViewAnimationOptions.ShowHideTransitionViews, completion: nil) 

I created frontView and backView in StoryBoard, and the backView is hidden initially.

Please help me flip only the sub-views too.

+2
ios swift uiviewanimation
source share
2 answers

This question is old, but it can help someone. If you want to flip your self.view, use it:

 UIView.transitionWithView(self.view, duration: 0.8, options: UIViewAnimationOptions.TransitionFlipFromRight | UIViewAnimationOptions.ShowHideTransitionViews, animations: { self.view.addSubview(newView) }, completion: { finished in //HERE you can remove your old view oldView.removeFromSuperview() }) 
+4
source share

Finally, I got a fix for this, we need to add frontView and backView to another View (container) not for self.view, then the container will flip over.

+3
source share

All Articles