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 Action | |
protocol MyViewModelInputsType { | |
// Inputs headers | |
} | |
protocol MyViewModelOutputsType { | |
// Outputs headers | |
} |
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 Action | |
enum SceneStateOutput { | |
case idle | |
case sendingNoRecipient | |
case sendingSomeRecipients(sendingList: [String: String]) | |
case sending | |
} |
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 RxCocoa | |
import Action | |
final class ViewController: UIViewController, BindableType { | |
// UI Elements | |
fileprivate var aButton = ViewController._aButton() | |
fileprivate var anotherButton = ViewController._aButton() | |
fileprivate let logo = ViewController._logo() |
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 RxSwiftExt | |
enum AuthenticationStatus { | |
case none | |
case error(AuthServiceError) | |
case user(String) | |
} | |
final class AuthManager { |
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
final class Singleton { | |
static let shared = Singleton() | |
private init() { } | |
} |
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 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 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 UIKit | |
extension Scene { | |
func viewController() -> UIViewController { | |
switch self { | |
case .firstScene(let viewModel): | |
let nc = UINavigationController(rootViewController: FirstSceneViewController()) |
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 UIKit | |
import RxSwift | |
protocol BindableType { | |
associatedtype ViewModelType | |
var viewModel: ViewModelType! { get set } | |
func bindViewModel() | |
} |
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 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 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 UIKit | |
enum SceneTransitionType { | |
case root | |
case push(animated: Bool) | |
case modal(animated: Bool) | |
// Add custom transtion types... | |
case pushToVC(stackPath: [UIViewController], animated: Bool) | |
} |
OlderNewer