-
-
Save ermik/708f5d299a5981d057e09971155371e3 to your computer and use it in GitHub Desktop.
Shared RIB Interface ('ChangePassword' Example)
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
// -------------------------------------------------------------------- | |
// ChangePasswordViewController.swift | |
// -------------------------------------------------------------------- | |
import ChangePasswordShared | |
import RxCocoa | |
import RxSwift | |
import UIKit | |
final class ChangePasswordViewController: UIViewController, View { | |
lazy var passwordFieldObservable: Observable<String> = passwordField.rx.text.asObservable() | |
lazy var didSubmitObservable: Observable<Void> = submitButton.rx.tap | |
var isSubmitEnabled: Bool { | |
get { return submitButton.isEnabled } | |
set { submitButton.isEnabled = newValue } | |
} | |
private let submitButton = UIButton() | |
private let passwordField = UITextField() | |
// etc. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment