画面切替
snapshotViewとの組み合わせでいける。
let currentView = self.view.snapshotView(afterScreenUpdates: true)! self.view.addSubview(currentView) 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() })