ビューの遷移を真似たい場合snapshotViewとtransitionをくみあわせる。
let currentView = self.view.snapshotView(afterScreenUpdates: true)! self.view.addSubview(currentView) setup() UIView.transition(with: currentView, duration: 0.5, options: [.transitionFlipFromRight], animations: { currentView.frame = CGRect(origin: CGPoint(x:-self.view.frame.width, y:currentView.frame.origin.y), size: currentView.frame.size) } , completion: { _ in currentView.removeFromSuperview() })