Last active
March 17, 2017 22:02
-
-
Save elefantel/d7f0595a438eea89309eeb0c1263d781 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//navigate within same module | |
func navigateToPayment() { | |
let storyboard = UIStoryboard(name: "Transactions", bundle: nil) | |
if let controller = storyboard.instantiateViewController(withIdentifier: "PaymentViewController") as? PaymentViewController { | |
self.navigationController.pushViewController(controller, animated: true) | |
} | |
} | |
//navigate to different module | |
func navigateToPortfolioDashboard() { | |
let portfolioModule = Bundle(for: DashboardViewController.self) | |
let storyboard = UIStoryboard(name: "Dashboard", bundle: portfolioModule) | |
if let viewController = storyboard.instantiateViewController(withIdentifier: "DashboardViewController") as? DashboardViewController { | |
self.navigationController?.pushViewController(viewController, animated: true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment