Skip to content

Instantly share code, notes, and snippets.

@ivangodfather
Created November 5, 2015 18:21
Show Gist options
  • Select an option

  • Save ivangodfather/b11571aa654040025406 to your computer and use it in GitHub Desktop.

Select an option

Save ivangodfather/b11571aa654040025406 to your computer and use it in GitHub Desktop.
class CarWireframe {
private var storyboard : UIStoryboard {
return UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
}
func getRootNavigationController() -> UINavigationController {
let rootViewController = storyboard.instantiateViewControllerWithIdentifier("CarListViewControllerIdentifier") as! CarListViewController
rootViewController.carListPresenter = ServiceLocator.instance.getPresenterForCarList(rootViewController, wireframe: self)
return UINavigationController(rootViewController: rootViewController)
}
func goToDetailCar() {
let detailCarVC = storyboard.instantiateViewControllerWithIdentifier("DetailCarVCIdentifier")
getRootNavigationController().pushViewController(detailCarVC, animated: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment