Skip to content

Instantly share code, notes, and snippets.

@Otbivnoe
Created February 1, 2018 05:26
Show Gist options
  • Save Otbivnoe/98f50a8c32a2acbfa4e474edb9a061e7 to your computer and use it in GitHub Desktop.
Save Otbivnoe/98f50a8c32a2acbfa4e474edb9a061e7 to your computer and use it in GitHub Desktop.
final class ProfileRouter: Router<ProfileViewController> {
typealias Routes = Closable
}
final class ProfileViewController: UIViewController {
private let router: ProfileRouter.Routes
init(router: ProfileRouter.Routes) {
self.router = router
super.init(nibName: nil, bundle: nil)
}
func closeButtonPressed() {
router.close()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment