Skip to content

Instantly share code, notes, and snippets.

@Otbivnoe
Last active January 31, 2018 12:13
Show Gist options
  • Save Otbivnoe/6f2ebb90d19d5f74c8f06693a5b9957c to your computer and use it in GitHub Desktop.
Save Otbivnoe/6f2ebb90d19d5f74c8f06693a5b9957c to your computer and use it in GitHub Desktop.
final class FriendsRouter: Router<FriendsViewController>, FriendsRouter.Routes {
typealias Routes = ProfileRoute & /* other routes */
}
final class FriendsViewController: UIViewController {
private let router: FriendsRouter.Routes
init(router: FriendsRouter.Routes) {
self.router = router
super.init(nibName: nil, bundle: nil)
}
func userButtonPressed() {
router.openProfile(for: /* some user */)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment