Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Created July 7, 2017 08:44
Show Gist options
  • Save SunXiaoShan/4be2950179f65e6165b4073e8360e76e to your computer and use it in GitHub Desktop.
Save SunXiaoShan/4be2950179f65e6165b4073e8360e76e to your computer and use it in GitHub Desktop.
SignalExample2
// create a signal
RACSubject *subject = [RACSubject subject];
// subscribe notification
[subject subscribeNext:^(id _Nullable x) {
NSLog(@"content 2:%@", x);
}];
// send message
[subject sendNext:@"message 2"];
// output
// content 2:message 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment