Created
January 1, 2018 23:18
-
-
Save twittemb/d7b64484afaf3bffe0e561246e8b1577 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 UIKit | |
import RxFlow | |
import RxSwift | |
import RxCocoa | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
let disposeBag = DisposeBag() | |
var window: UIWindow? | |
var coordinator = Coordinator() | |
let movieService = MoviesService() | |
lazy var mainFlow = { | |
return MainFlow(with: self.movieService) | |
}() | |
func application(_ application: UIApplication, | |
didFinishWithOptions options: [UIApplicationLaunchOptionsKey: Any]?) | |
-> Bool { | |
guard let window = self.window else { return false } | |
Flows.whenReady(flow: mainFlow, block: { [unowned window] (root) in | |
window.rootViewController = root | |
}) | |
coordinator.coordinate(flow: mainFlow, | |
withStepper: OneStepper(withSingleStep: DemoStep.apiKey)) | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment