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 RxSwift | |
protocol SceneCoordinatorType { | |
init(window: UIWindow) | |
var currentViewController: UIViewController { get } | |
@discardableResult | |
func transition(to scene: Scene, type: SceneTransitionType) -> Observable<Void> |
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 RxSwift | |
protocol BindableType { | |
associatedtype ViewModelType | |
var viewModel: ViewModelType! { get set } | |
func bindViewModel() | |
} |
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 | |
extension Scene { | |
func viewController() -> UIViewController { | |
switch self { | |
case .firstScene(let viewModel): | |
let nc = UINavigationController(rootViewController: FirstSceneViewController()) |
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 Foundation | |
enum Scene { | |
// Sub-group of scenes related to each other | |
// E.g.: all scenes part of a login process | |
case firstScene(FirstSceneViewModel) | |
case secondScene(SecondSceneViewModel) | |
// Another sub-group of scenes related to each other | |
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
final class Singleton { | |
static let shared = Singleton() | |
private init() { } | |
} |
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 RxSwift | |
import Action | |
protocol MyViewModelInputsType { | |
// Inputs headers | |
} | |
protocol MyViewModelOutputsType { | |
// Outputs headers | |
} |
NewerOlder