実装
let nextvc = nextvcViewController()
nextvc.view.backgroundColor = UIColor.red
let transition = CATransition()
transition.duration = 0.5
transition.type = kCATransitionPush
transition.subtype = kCATransitionFromRight
view.window!.layer.add(transition, forKey: kCATransition)
self.present(nextvc, animated: false, completion: nil)
参照
How to present view controller from right to left in iOS using Swift
Swift3 – PresentsViewControllerで左右に画面遷移する方法
追記
これでもいける
let storyboard: UIStoryboard = self.storyboard! let nextView = storyboard.instantiateViewController(withIdentifier: "EditTextViewController") let transition = CATransition() transition.duration = 0.5 transition.type = kCATransitionPush transition.subtype = kCATransitionFromRight view.window!.layer.add(transition, forKey: kCATransition) present(nextView, animated: true, completion: nil)