Created
December 9, 2016 16:09
-
-
Save czars/6efe2bbcb112d9a86d94bddedd7af319 to your computer and use it in GitHub Desktop.
test
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
var states: Variable<[String]> = Variable([]) | |
states.asObservable() | |
.filter({ (array) -> Bool in | |
var valid: Bool = true | |
for x in array { | |
valid = x.characters.count > 3 | |
} | |
print(valid) | |
return valid | |
}).subscribe(onNext: { _ in | |
print("init") | |
}).addDisposableTo(DisposeBag()) | |
let name = nameTextField.rx.text | |
name.subscribe(onNext: { (string) in | |
states.value.append((string as! String?)!) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment