Last active
April 4, 2020 06:54
-
-
Save zafarivaev/04ac54891b50b907d5637fc69514af75 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 RxSwift | |
import ReactiveCoordinator | |
class HolidayDetailCoordinator: ReactiveCoordinator<Void> { | |
private let rootViewController: UIViewController | |
public var viewModel: HolidayViewModel! | |
init(rootViewController: UIViewController) { | |
self.rootViewController = rootViewController | |
} | |
override func start() -> Observable<Void> { | |
let viewController = HolidayDetailViewController() | |
viewController.viewModel = viewModel | |
let didClose = viewModel.didClose | |
rootViewController.navigationController? | |
.pushViewController(viewController, animated: true) | |
return didClose | |
.take(1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment