Complete the code to push a new view controller onto the navigation stack.
navigationController?.[1](DetailViewController(), animated: true)Use pushViewController to navigate forward in a navigation stack.
Complete the code to pop the current view controller from the navigation stack.
navigationController?.[1](animated: true)Use popViewController to go back to the previous screen in a navigation stack.
Fix the error in the code to present a view controller modally.
present([1], animated: true, completion: nil)To present a new screen modally, pass the new view controller instance to present.
Fill both blanks to pop to the root view controller with animation.
navigationController?.[1](animated: [2])
Use popToRootViewController(animated: true) to go back to the first screen with animation.
Fill all three blanks to replace the current view controller stack with a new one.
navigationController?.[1]([[2]], animated: [3])
Use setViewControllers with an array of new controllers and animation flag to replace the stack.