Last active
January 20, 2018 01:19
-
-
Save twittemb/af8ec3cea94ef874bc776e393f50e184 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
import RxFlow | |
import UIKit | |
class WatchedFlow: Flow { | |
... | |
private let service: MoviesService | |
init(withService service: MoviesService) { | |
self.service = service | |
} | |
... | |
private func navigateToMovieListScreen () -> [NextFlowItem] { | |
// inject Service into ViewModel | |
let viewModel = WatchedViewModel(with: self.service) | |
// injecy ViewMNodel into UIViewController | |
let viewController = WatchedViewController.instantiate(with: viewModel) | |
viewController.title = "Watched" | |
self.rootViewController.pushViewController(viewController, animated: true) | |
return [NextFlowItem(nextPresentable: viewController, nextStepper: viewModel)] | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment