Last active
January 31, 2018 12:13
-
-
Save Otbivnoe/6f2ebb90d19d5f74c8f06693a5b9957c 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
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