Skip to content

Instantly share code, notes, and snippets.

@elefantel
Last active April 25, 2017 12:39
Show Gist options
  • Save elefantel/1a94debcaacc6051f90d1253c2f2f9ad to your computer and use it in GitHub Desktop.
Save elefantel/1a94debcaacc6051f90d1253c2f2f9ad to your computer and use it in GitHub Desktop.
//navigate within same module
func navigateToPayment() {
if let controller = AppStoryboard.Transactions.viewController(viewControllerClass: PaymentViewController.self) {
self.navigationController.pushViewController(controller, animated: true)
}
}
//navigate to different module
func navigateToPortfolioDashboard() {
let portfolioModule = Bundle(for: DashboardViewController.self)
if let viewController = self.instantiateViewController(viewControllerClass: DashboardViewController.self, inStoryboard: AppStoryboard.Dashboard.name, ofModule: portfolioModule) {
self.navigationController?.pushViewController(viewController, animated: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment