I would like to push from ViewController1 to ViewController2, without ViewController1 in the navigation stack. (animated)
This will not have animation:
self.navigationController?.viewControllers = [ViewController2()]
This will not have animation too:
UIView.animateWithDuration(0.3) {
self.navigationController?.viewControllers = [ViewController2()]
}
This doesn't have any animation as well:
self.navigationController?.popToRootViewControllerAnimated(false)
self.navigationController?.pushViewController(ViewContorller2(), animated: true)
What is the proper way to animate a push from to ViewController2 (without back button to view controller 1)?
