Skip to content

Instantly share code, notes, and snippets.

@twittemb
Created January 1, 2018 23:18
Show Gist options
  • Save twittemb/d7b64484afaf3bffe0e561246e8b1577 to your computer and use it in GitHub Desktop.
Save twittemb/d7b64484afaf3bffe0e561246e8b1577 to your computer and use it in GitHub Desktop.
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