Component - Programmatic navigation
This UI component shows how to move from one screen to another in an iOS app using code. Instead of tapping a link, the app decides when to go to the next screen.
This UI component shows how to move from one screen to another in an iOS app using code. Instead of tapping a link, the app decides when to go to the next screen.
NavigationView
└── VStack
├── Text
└── ButtonpushViewController do in iOS programmatic navigation?pushViewController adds a new screen on top, moving forward.DetailViewController onto the navigation stack?DetailViewController() to create an instance before pushing.func buttonTapped() {
let vc = SettingsViewController()
navigationController?.pushViewController(vc, animated: true)
}func goBack() {
navigationController.popViewController(animated: true)
}Pass the test and this pattern moves unknown