Last active
August 29, 2015 14:08
-
-
Save bobspryn/fd3b14a49582c4aa9af1 to your computer and use it in GitHub Desktop.
basicSubscribe.m
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
- (void) viewDidLoad { | |
// ... | |
// create and get a reference to the signal | |
RACSignal *usernameValidSignal = RACObserve(self.viewModel, isUsernameValid); | |
// update the local property when this value changes | |
[usernameValidSignal subscribeNext:^(NSNumber *isValidNumber) { | |
self.usernameIsValid = isValidNumber.boolValue | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you forget the "subscribeNext":