Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
presenting a new VC from a modal and setting the navigation stack to other VC
func primaryButtonPressed() {
weak var pvc = self.presentingViewController
dismiss(animated: true, completion: {
let myTripsView: MyTripsHomeViewController = ModulesAssembler().resolve()
let home: ODGBaseHomeViewController = ODGBaseHomeViewController()
if var navstack = myTripsView.navigationController?.viewControllers {
navstack.append(contentsOf: [home])
myTripsView.navigationController?.setViewControllers(navstack, animated: true)
}
pvc?.show(myTripsView, sender: nil)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.